Subject Re: [firebird-support] inserting special characters with insert statements
Author Michael Ludwig
Newbie schrieb am 10.09.2012 um 22:36 (+0300):
> When inserting data with insert scripts containing special characters
> for example spanish "ñ" I get
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = -104.
>
> however when entering same thing though IBExpert table data interface
> all is OK.
>
> Field's Charset is UTF8, Collate is Unicode.
> how should special characters be entered though script?

By matching your script encoding with your connection encoding. And,
for readability, with your cmd.exe encoding. Note that due to history
being convoluted, an encoding may also be called "character set" (SQL)
or "codepage" (Windows).

D:\Temp :: chcp 1252

console window set to codepage 1252

D:\Temp :: type eg.sql
create table Tn ( a varchar(10) character set utf8 );
commit;
insert into Tn values ('mañana');
commit;
select * from Tn;
commit;
drop table Tn;

file also written in codepage 1252 ("ANSI")
now use the appropriate -ch option with isql

D:\Temp :: isql -u milu -p moin eins -i eg.sql -ch win1252

A
==========
mañana

--
Michael