<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>All in all Graeme is right. FPC looks pretty much broken to me, too.</div>
<div>For my projects I pulled the emergency-break on anything FPC.</div>
<div> </div>
<div>The most serious flaws for me of FPC 3.0 are:</div>
<div>- assuming that it's possible to assign an encoding to every string</div>
<div>- using an (unsafe) guess about the encoding for auto-conversions</div>
<div> </div>
<div>It's not possible to assign a valid encoding to every string (not automatically, and not even manually).</div>
<div> </div>
<div>Some examples:</div>
<div>
<div>1) String-Buffers</div>
<div>Split a UTF-8 String into chunks of 1024 bytes. Trying to assign an encoding to</div>
<div>those chunks, and allowing auto-conversions will just lead to corruption.</div>
<div>
<div> </div>
<div>Where is the string-type for string-buffers gone?</div>
<div>
<div> </div>
<div>2) Most programming languages out there use something like "sequence of UTF-16 codepoints" as a string-type.</div>
<div>(That's not the same as UTF-16 string !!!!!)</div>
<div>It's a proper string type for "UTF-16 buffer" - pretty much nobody out there uses a low-level string-type that assumes</div>
<div>that the content is a complete UTF-16 string.<br/>
</div>
</div>
</div>
3) Filenames on Windows</div>
<div>You can't convert any random filename on Windows to UTF8 and back without dataloss.</div>
<div>There simply isn't any encoding that correctly fits to all possible filenames.</div>
<div> </div>
<div>A lot of APIs use buffers. You can try to assign an encoding to a buffer, but if you use that encoding</div>
<div>to auto-convert anything you made a blatant mistake. Assuming that anything from the outside world</div>
<div>(WindowsAPI, C#, Java...) is UTF-16 is yet another blatant mistake...</div>
<div>
<div> </div>
<div>4) some Barcodes,</div>
<div>5) Various File-Format-Standards,</div>
<div>6) anything that uses ASCII + some Control-Bytes for communication,</div>
<div>7) some encodings used in databases, ...</div>
<div>all that won't fit into the FCP scheme of 'known encodings'..</div>
<div> </div>
</div>
<div>The most obvious showstoppers for FPC 3.0 are:</div>
<div>FPC 3.0 doesn't have a useful type for string-buffers.</div>
<div>FPC 3.0 doesn't have a useful type for Filenames</div>
<div>FPC 3.0 adds unsafe auto-conversions</div></div></body></html>