Subject Re: [firebird-support] Re: How to 'upper' characters with accents?
Author Stefan Heymann
Phil,

> I thought it may have been to do with codesets... much easier than I
> was expecting. I changed the charset and collation and UPPER(MyText)
> now works correctly without problem, great.

What you need is the correct combination of Character Set and
Collation. With that, you can UPPER() everything correctly.

> However I've been unable to achieve (2)

There is no way (built into Firebird) to un-accent a character (and I
am not aware that such a thing is used elsewhere -- why does one want
to remove accents?)

> I thought maybe I could set the charset/collation of MyUText column
> to something like ASCII, but calling 'set MyUText = upper(MyText)'
> fails with an overflow/truncation - no surprise I guess. Do you
> think some variation on this approach would work or is this never
> going to work?

Please take a look at this page, it explains the character set and
collations concepts so you can see what you need:
http://www.destructor.de/firebird/charsets.htm

To automatically update your MyUText column, the trigger would look
like this:

CREATE TRIGGER BIU_MYTABLE FOR MYTABLE
ACTIVE
BEFORE INSERT OR UPDATE
AS
BEGIN
NEW.MyUText = UPPER (NEW.MyText);
END


Best Regards

Stefan




--
Stefan Heymann
www.destructor.de/firebird