Subject | Re: win1252 and upper() |
---|---|
Author | colinriley666 |
Post date | 2005-04-14T13:02:54Z |
Hello Pavel,
thank you very much for replying. I've added a few columns for test
purposes :
X1 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_INTL,
X2 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_INTL850,
X3 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_NORDAN4,
X4 VARCHAR(50) CHARACTER SET WIN1252,
X5 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_SPAN,
X6 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_SWEDFIN
I then performed :
update the_table
set x1 = upper('Dogné'), x2 = upper('Dogné'), x3 = upper('Dogné'),
x4 = upper('Dogné'), x5 = upper('Dogné'), x6 = upper('Dogné')
where the_key = 36545;
The 'é' is alt-0233, and looking with a hex editor = x'E9'.
The results in all six of the columns is 'DOGNé'.
Any further thoughts?
regards, Colin
--- In firebird-support@yahoogroups.com, Pavel Menshchikov
<mpn2001@y...> wrote:
thank you very much for replying. I've added a few columns for test
purposes :
X1 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_INTL,
X2 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_INTL850,
X3 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_NORDAN4,
X4 VARCHAR(50) CHARACTER SET WIN1252,
X5 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_SPAN,
X6 VARCHAR(50) CHARACTER SET WIN1252 COLLATE PXW_SWEDFIN
I then performed :
update the_table
set x1 = upper('Dogné'), x2 = upper('Dogné'), x3 = upper('Dogné'),
x4 = upper('Dogné'), x5 = upper('Dogné'), x6 = upper('Dogné')
where the_key = 36545;
The 'é' is alt-0233, and looking with a hex editor = x'E9'.
The results in all six of the columns is 'DOGNé'.
Any further thoughts?
regards, Colin
--- In firebird-support@yahoogroups.com, Pavel Menshchikov
<mpn2001@y...> wrote:
> Hello Colin,as:
>
> c> The data contains accented characters, and the table is defined
>not
> c> CREATE TABLE PATIENTEN (
> c> blah blah blah ....
> c> FAMILIENAAM VARCHAR(40) CHARACTER SET WIN1252
> c> );
>
> c> The data in this field is for example "Dogné", and I want it in
> c> upper case.
>
> c> update isa_patienten set familienaam = upper(familienaam);
>
> c> results in "DOGNé". Why don't I get "DOGNÉ" ?
>
> I think you should specify the collation for your varchar field(s)
> additionally. The collation "knows" how to covert "é" to "É" (but
> the default collation WIN1252). The list of available collationsfor
> WIN1252 character set: WIN1252, PXW_INTL, PXW_INTL850, PXW_NORDAN4,
> PXW_SPAN and PXW_SWEDFIN.
> Probably you'd better to create domains like
> -----
> CREATE DOMAIN <YourDomainName> AS VARCHAR(40)
> CHARACTER SET WIN1252 COLLATE <YourCollationName>;
> -----
> and use them for your field(s).
>
>
> HTH
> --
> Best regards,
> Pavel Menshchikov
> http://www.ls-software.com