Subject Re: Problem with UPPER() when using Greek Charsets
Author tilemahosmanolatos
Dear Helen,
Thank you!
I had success in a column-level:
CREATE TABLE TEST (
ID INTEGER NOT NULL,
DESCR VARCHAR(50) COLLATE PXW_GREEK
);

"select upper(descr) from test" (without SQL-level COLLATE) worked ok!

Now what remains is to resolve the following issues:
(1) How can I upper a string literal? eg select upper('my greeks
here') from rdb$database

(2) In General, WIN1253 is a "restricted" Windows Encoding. The
perfect for us is to find out how to work with Unicode wich is (a) a
standard and (b) truly multilingual: Our projects have most EU
languages (Greek, Spanish, German, French etc) so ISO-8859-7 and
WIN1253 are Greek-Only (+English)!

So, Could you pls help me with Unicode? I will greatly appreciate
this!

Sorry for bothering you :-)

Kindest Regards,
Tilemahos


--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 07:42 AM 11/08/2004 +0000, you wrote:
> >Hi,
> >When using the upper() function in a varchar column containing
Greek
> >data (i.e. ISO-8859-7, UNICODE, WIN1253), we see no effect in the
> >original string.
> >Example
> >select upper('My LowerCase string in Greek') from test
> >it returns always the original string.
> >
> >Is there any way to overcome this problem? We think that Firebird
is
> >superb, but this (if we cannot resolve it) is a major weakness (at
> >least for Greek Customers)...
>
> Our "Greek Guru" has gone to Athens for the Games so it's going to
be some
> time before we hear from him. :-)
>
> I'll try to start it off but, not knowing myself what any Greek
capital
> letter should look like, can't test for you...
>
> First, UNICODE_FSS is a very blunt instrument. It can store upper-
case
> Greek characters, but it has no knowlege of the mappings between a
> lower-case character and its upper-case equivalent, for any
language-symbol
> set.
>
> ISO8859-7, with the default (and only available) COLLATE sequence
> ISO8859-7, and WIN1253, with the default COLLATE sequence WIN1253,
are
> binary collations. This is governed by a rule that all the default
> collations (the ones with names matching the character set names)
are
> binary: they have all the characters, but they don't know the
upper/lower
> mappings.
>
> In the case of ISO8859-7 (and some of the other ISO sets) I'm not
> absolutely certain that the binary rule actually applies to the
default
> COLLATE sequence. It would be worth trying, at least, to test
whether
> UPPER gives you uppercasing for that set.
>
> The thing to try would be WIN1253 with the COLLATE sequence
PXW_GREEK. If
> the column itself has not been defined with COLLATE PXW_GREEK then
try to
> apply the collation to the output, as follows:
>
> select upper('My LowerCase string in Greek') COLLATE PXW_GREEK from
test
>
> If that works, then you might like to consider rebuilding the table
> definitions of tables that you know you need uppercasing for. It's
best to
> avoid imposing non-binary collations on columns where they are not
needed,
> because they add more limits to the widths of indexes.
>
> Let us know what you find, because this is a poorly documented area.
>
> /heLen