[fpc-devel] new strings, rawbyte type, but what about "raw" encoding

Martin lazarus at mfriebe.de
Tue Oct 11 03:44:01 CEST 2011


Just out of curiosity, and without even being sure, if a real use case 
for something like this ever exists

With the new strings, the encoding is part of the data, not the type. 
However most  types force a specific encoding, therefore conversion occurs.

rawbytestring does not force a specific encoding. It keeps whatever 
encoding the data has. the encoding however is still present, so 
assigning to an type with enforced encoding will still do the converison 
if required.

Now my question.
Is there (or going to be) an encoding, that is "unknown" and will never 
be converted. but can be assigned to any of the types?

Of course I am aware, that this would have dangers. As it would bypass 
the "enforced" encodings....

Anyway just asking



More information about the fpc-devel mailing list