Subject Re: [firebird-support] Character set was RE: Digest Number 1619
Author Helen Borrie
At 10:48 AM 25/07/2003 -0300, you wrote:
>Thanks Helen, sorry about the subject: I realized what I did after I send
>the message (this message board is not very compfortable).
>
>So, please correct me if I'm wrong but I got that the best solution for me
>would be to backup, create a new database setting the charset, and restore.

There's a bit more to it than that. If you are certain that all of the
characters in your CHARSET NONE columns belong to the charset you decide to
use, you can "pump" the NONE data into a charset column using a kind of
"character set casting", something like

update mytable set CharColumn = ISO8859_1 NoneColumn
where NoneColumn is not null

or if you are using something like the IB_SQL datapump utility, you would
set it up so that the source query was something like

select blah1, blah2,
char_col1,
char_col2,
etc.
from mytable

and the destination

insert into mytable (blah1, blah2, char_col1, char_col2..etc)
values ( :blah1, :blah2,
ISO8859_1 :char_col1,
ISO8859_1 :char_col2,
etc.
...)

>wich charset would be best for spanish people using W98 ?

ISO8859_1 with collation order ES_ES or WIN1252 with PXW_SPAN (wait for a
Spanish list member to tell you which is best).

>Would Win1250 do
>it ? Where can I find the characters table for each character set ?

Google would be a good place to look.


> > Character set NONE will accept any byte and write it to the database as a
> > character. The problem comes then, when reading it. If any character is
> > not in the US Ascii character set, it will throw a transliteration error
> > because it doesn't know what to do with it.
>
>US Ascii is only the first 167 characters ? Characters I'm talking about are
>á,é,í,ó,ú and ñ (including their capital versions), and they are all part of
>extended ASCII. In my opinion (wich is very important, to me at least) it
>should work with the extended one.

It doesn't work like that. There are international standards determining
which character images get assigned to which number. There are not enough
numbers for all of the characters in the world, so the same numbers have to
be used for different character images and arranged into sets that don't
conflict. Hence, you get character sets.

>(I understand that you mean that US Ascii is the default charset in
>Firebird)

I guess so. You have characters on your keyboard that aren't on mine. US
keyboards look pretty much like mine.

:-)

heLen