[fpc-devel] Unicode and UTF8String

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Dec 1 20:42:12 CET 2008


On Mon, 01 Dec 2008 15:06:45 +0000
Martin Friebe <fpc at mfriebe.de> wrote:

> Florian Klaempfl wrote:
>[...]
> My opinion is that it should be the programmers choice. I a
> programmer wants or needs a simpler way (keeping all the strings in
> is application in one format, which will be known to him) then he/she
> should have that choice. And then on this type the person could
> perform any index or index-like operation.

About: keeping all the strings in is application in one format, which will be known to him

Only small programs can do that. All others use third party packages.
If you want choice, then all used third packages must support all
possible choices. Unlikely.


> That would mean that in order to avoid conversation, some functions
> of the RTL would be needed in overloaded versions for each string
> type. IMHO this applies only to those, which do not (or not always)
> make calls to the OS. Any other function does the conversation
> anyway. (It will be a case by case base)

Sorry, I can't follow here.
Please enlighten me, why an overloaded function with an internal
conversion is better than an implicit conversion?


>[...]
> Also it would be nice (so I do not know how) not to have to duplicate 
> code, in order to archive this. Something like generics, maybe.

The goal of RTLString is to avoid duplicate code in the RTL.


Mattias



More information about the fpc-devel mailing list