Subject Re: [firebird-support] ib_udf, fbudf & UTF-8
Author Paul Vinkenoog
Hi,

> Currently we're useing WIN1250/PXW_HUNDC. The DDL is the next :
>
> 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?

I think the question should be: does substr (which is in ib_udf only) support UTF-8?

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