Subject Re: [firebird-support] Firebird 2.5 - UTF8 - UDFs
Author Dmitry Kuzmenko
Hello, castel!

Monday, March 4, 2013, 7:08:52 PM, you wrote:

cmtb> Now I'm testing my application in Delphi 5 where my
cmtb> ib_connection.charset is now defined to WIN1252 and all seemed
cmtb> to work fine with the firebird 2.5 and utf8.

cmtb> Until i tried to create a record where the field value was
cmtb> containing "€" and a trigger was on that table and working this
cmtb> value with a UDF, i received the error message : "malformed string at trigger ...."

cmtb> The UDF was compiled with Lazarus on Windows 64-bits, because
cmtb> the firebird server is installed on windows 64-bits.

You can find example in my uniciode faq
http://www.ibase.ru/unicode_faq.html

at the end. You may try to use google translate to understand the
text, but the rules are simple:

1. to use unicode in udf it is better to have unicode compiler,
like Delphi 2009-XE3. Moreover, XE2 and XE3 have 64bit compiler
(but only for Windows, if you work on Linux).

2. if you use non-unicode udf, you must declare character set
for the input/output udf params.

3. of course, you will not be able to pass characters,
that don't exist in your non-unicode charset.

--
Dmitry Kuzmenko, www.ib-aid.com