Subject | Re: [firebird-support] Re: Using unicode versus WIN1252 (Firebird 2) |
---|---|
Author | Milan Babuskov |
Post date | 2009-01-09T15:36:30Z |
josef_gschwendtner wrote:
represents them as 4-bytes-per-character internally.
bytes. Try creating a CHAR(32000) column with UTF8 and WIN1252 charset
to see what I'm talking about.
with some text editor, create a new database with UTF8 default charset
and run DDL script in it.
--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com
>> Main issue is the storage size of Unicode and UTF8. Since moreOnly when represented in UTF8 form. However, Firebird internally
> bytes are
>> used per character, this means that you can have less characters in
>> char/varchar fields, procedure parameter, indexes and for
>> sorting/grouping operations. Consequently, some of your queries
> that
>> work with WIN1252 might fail with UTF8.
>
> German characters mostly have ASCII < 7F. With UTF8 these characters
> have the same storage size as in WIN1252, right?
represents them as 4-bytes-per-character internally.
> Isn't it correct that a field/parameter with varchar(50) always hasYes, of course. But Firebird has various limits that are defined in
> room for 50 characters (albeit some characters need more then one
> byte)?
bytes. Try creating a CHAR(32000) column with UTF8 and WIN1252 charset
to see what I'm talking about.
>> Creating a new database and copying the data is as easy as:You're right, sorry about that.
>>
>> gbak -b -m database.fdb database.fbk
>> gbak -c database.fbk new_database.fdb
>> fbcopy se database.fdb new_database.fdb
>
> With this methode the new database has the same character set as the
> old one, right?
> What would be best practice to get a new database with a differentDump the DDL (using isql -x or your favorite admin. tool), find&replace
> default character set (UTF8)?
with some text editor, create a new database with UTF8 default charset
and run DDL script in it.
--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com