[fpc-devel] Trying to understand the wiki-Page "FPC Unicode support"
Marco van de Voort
marcov at stack.nl
Thu Nov 27 09:26:43 CET 2014
In our previous episode, Hans-Peter Diettrich said:
> > concatenated without data loss and that the result is then converted to
> > the target string's encoding (except in case the target is
> > RawByteString). How that is implemented exactly is undefined; again in
> > the meaning of "undefined", not in the meaning of "undefined when
> > defined as meaning X".
> In this case the implementation is "compiler specific", somewhat
> different from "undefined" (in a RawByteString):
> "CP_NONE: this value indicates that no code page information has been
> associated with the string data. The result of any explicit or implicit
> operation that converts this data to another code page is undefined."
> IMO the result is well defined: it's the string with the encoding of
> that "other" codepage. An "undefined" result, as I understand it, would
> mean "the result can be anything, unrelated to the function input".
This is usually called "implementation defined". But implementation defined
implies it will remain the same in every iteration of the compiler (usually
documented). If that is not wanted/possible, then it is considered
So even if a value happens to be defined in one version of the compiler, it
doesn't automatically make it implementation defined. It needs to be a
documented choice for that.
More information about the fpc-devel