[fpc-devel] Trying to understand the wiki-Page "FPC Unicode support"

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Nov 26 11:40:41 CET 2014


On Wed, 26 Nov 2014 11:23:17 +0100
Michael Schnell <mschnell at lumino.de> wrote:

>[...]
> It seems to be unavoidable to use the name "ANSIString" even though I 
> always though up when seeing a thing called "ANSI" containing Unicode 
> (e. g.   "UTF8String = type AnsiString(CP_UTF8)" ).

Is there a question?

 
> Seemingly here the "bytes per character" setting implicitly is thought 
> of as a port of the "code-page" definition. correct ?

Code page define bytes per character. 
As you know: Don't confuse character with glyph and codepoint.
Ansistring supports only one byte per character code pages.

 
> In section "Dynamic code page":
> 
> "When assigning a string to a plain AnsiString (= AnsiString(CP_ACP)) or 
> ShortString, the string data will however be converted to 
> DefaultSystemCodePage. The dynamic code page of that AnsiString(CP_ACP) 
> will then be the current value of DefaultSystemCodePage (e.g. 1250 for 
> the Windows-1250 code page), even though its static code page is CP_ACP 
> (which is a constant <> 1250). This is one example of how the static 
> code page can differ from the dynamic code page. Subsequent sections 
> will describe more such scenarios."
> 
> 1) A short String does not have a Code page notification so for this 
> "static code page can differ from the dynamic code page" does not seem 
> to make much sense.

What is a "Code page notification"? Do you mean "code page information"?
IMO the phrase "The dynamic code page of that AnsiString" is clear,
that it does *not* talk about ShortString.

Mattias



More information about the fpc-devel mailing list