On 10/21/2011 10:24 PM, Hans-Peter Diettrich wrote:


The bad news about new Delphi strings is the addition (overload) of functions with RawByteString arguments, which *take* strings of any encoding, but then *ignore* that encoding. These versions certainly must fail for all MBCS encodings :-(

Is there an agreement on how this should work ?

function parameter type .... Unicode string type coming in ... actual encoding ID of string coming in -> conversion

1) RawByte ... any .. any -> supposedly no, supposedly keeping the encoding ID
 2) not Raw ...  Raw ... $FFFF (="RAW") -> ???
 3) not Raw ... same  ... matching  -> obviously No
4) not Raw ... same ... not matching (maybe $FFFF) -> this is an intersexual String what to do ?
 5) not Raw ... Raw ...  matching to parameter type -> supposedly No
6) not Raw ... Raw ... not $FFFF but not matching the parameter type -> supposedly Yes 7) not Raw ... not Raw but different ... not $FFFF matching its own Type -> supposedly Yes 8) not Raw ... not Raw but different ... not $FFFF matching the Type of the parameter -> this is an intersexual String, not converting it would cure this. 9) not Raw ... not Raw but different ... not $FFFF matching neither -> this is an intersexual String what to do ? 10) not Raw ... not Raw but different ... $FFFF-> this is an intersexual String what to do ?

did I forget any cases ?
-Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to