Subject | Re: [firebird-support] ib_udf, fbudf & UTF-8 |
---|---|
Author | Paul Vinkenoog |
Post date | 2011-01-17T12:35:43Z |
Hi,
The answer is no. substr (and substrlen) work with bytes, not with characters.
Use the internal function SUBSTRING, which works with every character set.
http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-substring.html
HTH,
Paul Vinkenoog
> Currently we're useing WIN1250/PXW_HUNDC. The DDL is the next :I think the question should be: does substr (which is in ib_udf only) support UTF-8?
>
> DECLARE EXTERNAL FUNCTION SUBSTR
> CSTRING(32767),
> SMALLINT,
> SMALLINT
> RETURNS CSTRING(32767) FREE_IT
> ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
>
> Does ib_udf and fbudf support UTF-8? If so, how to define?
The answer is no. substr (and substrlen) work with bytes, not with characters.
Use the internal function SUBSTRING, which works with every character set.
http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-substring.html
HTH,
Paul Vinkenoog