Subject | Re: [firebird-support] Re: How to 'upper' characters with accents? |
---|---|
Author | Stefan Heymann |
Post date | 2006-07-14T07:10:15Z |
Phil,
Collation. With that, you can UPPER() everything correctly.
am not aware that such a thing is used elsewhere -- why does one want
to remove accents?)
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
> I thought it may have been to do with codesets... much easier than IWhat you need is the correct combination of Character Set and
> was expecting. I changed the charset and collation and UPPER(MyText)
> now works correctly without problem, great.
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 columnPlease take a look at this page, it explains the character set and
> 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?
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