Subject Re: udf won't do what it should
Author martinknappe
--- In firebird-support@yahoogroups.com, "Dimitry Sibiryakov" <SD@...>
wrote:
>
> On 23 Jun 2006 at 12:23, martinknappe wrote:
>
> >So, does that mean there is no solution to my problem:
>
> Why? There is: read a good book.
>
> >I have a database where all the char fields are of unicode_fss and I
> >am currently writing on a Delphi application that accesses this
> >database and I want my user be able to say 'replace any occurence of a
> >certain sequence of characters in field X (UNICODE_FSS) with a
> >different sequence of characters'. Writing this udf seemed to me like
> >the most natural way to achieve this, but if udfs dont support
> >widestrings, then how could i possibly go about this?
>
> UNICODE_FSS is not widestring. It is close to utf-8 and is sequence
> of one-byte characters. Change your procedure to accept PChar and use
> MBCS-aware routines instaed of Widechar routines.

don't know any such routines in delphi..but will it also do if i use
the normal string routines for ansi strings..i was thinking that
because ansi-string routines work byte-by-byte that might also be
valid for any other type of string (if 2 2-byte-characters are equal,
then their 4 1-byte-characters should also be equal respectively, and
so on...)