Subject Re: How to 'upper' characters with accents?
Author Adam
--- In, "phil_hhn" <time_lord@...>
> Hi, I'm currently using Firebird 1.5.3.
> I have a column called 'MyText', varchar(100). This column may
> works with accents, eg "hát" (the second character has an accent -
> is U 00E1). For searching purposes, I need to be able to find this
> word regardless of case. Always performing an 'UPPER()' on this
> is slow (there are a lot of rows), so for performance I added
> column 'MyUText'.
> In IBExpert I ran 'update MyTable set MyUText = upper(MyText)', but
> this does not convert all characters; in the above example "hát"
> becomes "HáT" (the second character was not uppercased).
> 1) Is it possible for firebird to 'upper' characters with accents
> also? Do I need to change the way the MyUText column is defined (eg
> particular codeset)? I accepted all defaults, locales, codesets, etc
> when I first created the database.
> 2) Is it possible for firebird to convert accented characters to
> non-accented ones (where an equivalent exists)? Then for example I
> could search for "HAT" and find "hát" (where the equivalent -
> uppercased - was "HAT").
> 3) I need to add a trigger so that whenever MyText is modified (or a
> row added) then MyUText is updated. This may only be practical if
> is possible; otherwise, I'll have to do the conversion through my
> code. Since MyText is updated from many different areas, a trigger
> would be preferable.
> Any comments? Are there any enhancements in Firebird v2 that are
> relevant here?

Read about COLLATIONS.

Firebird 2 will introduce the ability to index an expression, such as
UPPER(MyText), but once you read about collations and figure out the
best one to use, it may not be relevant.