>> >An "UTF8String" and an "UTF8 String" are two different things for the
>> >compiler. See below.
>> What is the difference? The link does not tell me.
>An "UTF8 String" is a String encoded in UTF-8.
>> >compiler. See below.
>> What is the difference? The link does not tell me.
>An "UTF8 String" is a String encoded in UTF-8.
>String and UTF8String are two different things for the compiler.
Of course String and UTF8String can be (but not neccesarily are) different, but you wrote:
" An "UTF8String" and an "UTF8 String" are two different things for the compiler. "
I know the type "UTF8String" but what is an "UTF8 String" (which you say differs)?
I know the type "UTF8String" but what is an "UTF8 String" (which you say differs)?
>My link explains some differences important for Lazarus.
But it does not explain the difference between an "UTF8String" and an "UTF8 String"
>The encoding hassle is built into Windows. The compiler cannot overcome
>it. It can only give you tools to make it easier.
>it. It can only give you tools to make it easier.
That is not true.
Windows uses 2 kinds of strings: ANSI (one byte) and/or UTF16 (2 byte).
None of them can be used with UTF8 functions so a conversion is needed anyway.
Either I am forced to do this prior to using these UTF8 functions myself or (if possible)
the compiler/system routines can do this in the background.
Why was this not done?
None of them can be used with UTF8 functions so a conversion is needed anyway.
Either I am forced to do this prior to using these UTF8 functions myself or (if possible)
the compiler/system routines can do this in the background.
Why was this not done?
There are procedures in LAZUTF8 that only work on UTF8Strings.
So why not force the parameters of these UTF8 routines to be UTF8Strings?
Anything else makes no sense because when feeding a non-UTF8-String
into such a routine that expects UTF8 leads to garbage.
So why not force the parameters of these UTF8 routines to be UTF8Strings?
Anything else makes no sense because when feeding a non-UTF8-String
into such a routine that expects UTF8 leads to garbage.
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus