On 2020-09-04 22:35, Adriano dos Santos Fernandes wrote:
On 05/08/2020 12:48, Ivan Přenosil wrote:
In FB2.5 I sometimes construct exception messages with newline like this
EXCEPTION E_ERROR 'msg-á' || x'0A0D' || 'msg-é';
In FB3 and FB4 it can cause error
Statement failed, SQLSTATE = 22000
Malformed string
-At block line: 4, col: 3
v2.5 treats exception text always as binary data, i.e., it does not
transliterate.
Since v3 it tries to transliterate the exception text to UTF-8.
Later, it will transliterate to client charset.
When it tries to convert binary to UTF-8 you have this problem.
If binary, should it first try to convert to the client charset and then
to UTF-8?
That will fix this particular problem - but it does not help in general
case.
May be something more generic - when we meet an expression node that
casts from binary to some charset all it's children as deep as
expression evaluation continues should cast to that same charset before
transliterating to binary?
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel