Subject | Re: [firebird-support] UTF8 database and extended characters in metadata |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2008-11-13T13:03:46Z |
Martijn Tonies escreveu:
My tests (with WIN1252 connection charset and string encoding):
v2.0:
create table "ÅÄÖ"
( id integer)
Bug: arithmetic exception
v2.1 works.
When table already exists, exception text is not transliterated: Table
ÅÄÖ already exists
A easy way to test things is writing the script in notepad, save it
first as ANSI and save a copy as UTF8.
Then:
isql -ch win1252 -i ansi.sql > ansi.txt
isql -ch utf8 -i utf8.sql > utf8.txt
Another know problem you will see is the wrong formatting in utf8.txt.
The others things should be equal.
Adriano
> Hello Adriano,Yes, if you want manual encoding/decoding.
>
>>> Right, I've just experimented with sending SQL as UTF8 to Firebird
>>> when the database is UTF8
>> Database charset is used *only* when you are creating fields or
>> parameters without an explicit charset.
>>
>>> and that seems to work, including table
>>> names and so on. Would this be the correct way to go then?
>> It depends on what is "SQL as UTF8". Encoded in UTF-8? Then yes, if you
>> use UTF8 connection charset.
>
> Yes, I'm now encoding and decoding (exceptions/plans) when using
> UTF8 as both the connection and database default charactersets. When
> I use the table as in my first example, I can browse it, extract it's DDL
> and I get the correct plan (or exception when I modify the name in the
> SQL).
>
> When I'm using Win1252 as the connection charset, I'm not doing the
> encode/decode.
>
> Would this be correct and "as expected" for Firebird as well?
>
My tests (with WIN1252 connection charset and string encoding):
v2.0:
create table "ÅÄÖ"
( id integer)
Bug: arithmetic exception
v2.1 works.
When table already exists, exception text is not transliterated: Table
ÅÄÖ already exists
A easy way to test things is writing the script in notepad, save it
first as ANSI and save a copy as UTF8.
Then:
isql -ch win1252 -i ansi.sql > ansi.txt
isql -ch utf8 -i utf8.sql > utf8.txt
Another know problem you will see is the wrong formatting in utf8.txt.
The others things should be equal.
Adriano