[fpc-devel] Unicode and UTF8String

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Dec 1 21:25:11 CET 2008


On 01 Dec 2008, at 21:17, Marco van de Voort wrote:

> In our previous episode, Jonas Maebe said:
>
> (nsstring)
>
>> The advantage when using such a type is that you also only need to
>> convert it (internally, hidden from the user) on demand or when some
>> helper routine requires it (such as e.g. case-insensitive
>> comparisons). Otherwise, no conversion whatsoever is necessary.
>
> Do they have some way to indicate that a procedure/method only  
> supports a
> certain encoding?

No.

> Or do you have to manually force the encoding in that way?

Yes.

> I prefer a declarative way to solve this.


In the Pascal case, you could simply declare your parameter as  
UTF8String (or whatever) and the compiler would insert a conversion  
from this universal string type into a utf8string.


Jonas



More information about the fpc-devel mailing list