Subject | Re: Unicode text in Exception? |
---|---|
Author | Dmitry Yemanov |
Post date | 2015-01-29T16:01:56Z |
27.01.2015 14:48, Martijn Tonies wrote:
discussed but ended nowhere.
1) Connect as UTF8 charset
2) Create SP with EXCEPTION ERROR 'some Cyrillic string';
3) Validate that RDB$PROCEDURES.RDB$PROCEDURE_BLR (not
RDB$PROCEDURE_SOURCE!) really contains a Unicode string
4) Connect as WIN1251, execute SP - error text is Cyrillic
5) Connect as WIN1250, execute SP - cannot transliterate character
between character sets
Dmitry
>> btw, in Firebird 3, the RDB$EXCEPTIONS.RDB$MESSAGE is still NONE.Do you mean changing RDB$EXCEPTIONS.RDB$MESSAGE to UTF8? It was
>
> Would it make sense to encode the message according to the given connection
> character set?
discussed but ended nowhere.
>>> Now, I tried the following in the procedure to work around the above:I tried without the _utf8 prefix and it worked:
>>>
>>> exception test _utf8 'unicode string here';
>
> Any idea why this won't work either? Or at least, not in my test?
1) Connect as UTF8 charset
2) Create SP with EXCEPTION ERROR 'some Cyrillic string';
3) Validate that RDB$PROCEDURES.RDB$PROCEDURE_BLR (not
RDB$PROCEDURE_SOURCE!) really contains a Unicode string
4) Connect as WIN1251, execute SP - error text is Cyrillic
5) Connect as WIN1250, execute SP - cannot transliterate character
between character sets
Dmitry