Subject | Re: [firebird-support] Transliteration problem |
---|---|
Author | Geoff Worboys |
Post date | 2014-12-21T12:39:27Z |
I wrote:
Internal to Firebird the string is converted to Unicode, so
WIN1252 0x83 becomes U+0192. This is then converted to
uppercase which becomes U+0191. And then it tries to convert
back to WIN1252 and there is no WIN1252 mapping for that
unicode character (U+0191).
Bummer.
I can understand the logic in Firebird, but I don't relish
trying to explain to my customers: this will all work as long
as they stay away from 'ƒ'. (Such an explanation is likely
to have them using words starting with Ƒ, but I will have
to tell them, they can't use that in this database because we
don't have a mapping for it. ;-)
As a short term solution I'm going to translate U+0191 back to
WIN1252 0x83 in my own Firebird build. Long term I hope to
move to Unicode.
Thanks for listening, you've been a wonderful audience. :-)
--
Geoff Worboys
Telesis Computing Pty Ltd
> This:I've just answered my own question.
> SELECT Upper(_win1252 'ƒ') FROM RDB$DATABASE
> (Where 'ƒ' is decimal 131 / 0x83)
> Gives me error 335544321
> arithmetic exception, numeric overflow, or string truncation
> Cannot transliterate character between character sets.
Internal to Firebird the string is converted to Unicode, so
WIN1252 0x83 becomes U+0192. This is then converted to
uppercase which becomes U+0191. And then it tries to convert
back to WIN1252 and there is no WIN1252 mapping for that
unicode character (U+0191).
Bummer.
I can understand the logic in Firebird, but I don't relish
trying to explain to my customers: this will all work as long
as they stay away from 'ƒ'. (Such an explanation is likely
to have them using words starting with Ƒ, but I will have
to tell them, they can't use that in this database because we
don't have a mapping for it. ;-)
As a short term solution I'm going to translate U+0191 back to
WIN1252 0x83 in my own Firebird build. Long term I hope to
move to Unicode.
Thanks for listening, you've been a wonderful audience. :-)
--
Geoff Worboys
Telesis Computing Pty Ltd