Subject Re: Saving UTF-8 Chinese characters produced error - Invalid Token. Malformed String.
Author robertosmith8
Many thanks to Philippe. I have simulated the situation by your suggestion. Only problem is the notepad save the UTF-8 'Byte Order mark' - 'EF BB BF' characters at the beginning of the statement, so I have to use HexEdit Binary Editor to move the 'Byte Order Mark' to the front of the UTF-8 characters, right after the ' character.

After the binary editing, The insert statements are successfully executed. It is kind of tedious. What is the SQL text editor supporting UTF-8 characters that you recommend?

Thanks again.

Regards,
roberto

--- In firebird-support@yahoogroups.com, Philippe Makowski <makowski@...> wrote:
>
> Roberto Smith [09-10-19 16.12] :
> > Hi,
> >
> > I am experiencing this problem. Not sure if this is the bug of Firebird. I =
> > can't key in the UTF-8 charaters by ISQL, FlameRobin, Upscene Data Workbenc=
> > h. So the best tool to simulate is IBExpert operating in Windows XP. In Vis=
> > ta, the Chinese characters do not show at all in all tools, including IBExp=
> > ert.
> Try these it is ok for me :
>
> C:\Fb21\bin>isql 192.168.1.6:/Users/philippe/tempo/firebird_db/test.fdb -user SYSDBA
> -password masterkey
> Database: 192.168.1.6:/Users/philippe/tempo/firebird_db/test.fdb, User: SYSDBA
> SQL> SET NAMES UTF8;
> SQL> input 'test.sql';
> SQL> commit;
> SQL> select * from tutf8;
>
> F1
> ========================================
> õ©é
>
> SQL> exit;
>
>
> C:\Fb21\bin>isql 192.168.1.6:/Users/philippe/tempo/firebird_db/test.fdb -user SYSDBA
> -password masterkey
> Database: 192.168.1.6:/Users/philippe/tempo/firebird_db/test.fdb, User: SYSDBA
> SQL> SET NAMES UTF8;
> SQL> OUTPUT 'bla.txt';
> SQL> select * from tutf8;
> SQL> exit;
>
> test.sql is a file encoding UTF8 with :
> INSERT INTO TUTF8 VALUES ('丂');
>
> and the result bla.txt give a text file encoding utf8 with :
> F1
> ========================================
> 丂
>