|Subject:||Bug in idGlobal with ToBytes function and .NET|
|Posted by:||Marko Vodopija (marko…@SPAMindex.hr)|
|Date:||Fri, 27 Feb 2004|
There is a major bug in idGlobal.pas unit when converting string to TBytes:
Result := AnsiEncoding.GetBytes(AValue);
This works most of the time but when you are writing UTF-8 encoded string to
socket with some high byte characters, it converts them to ?.
AnsiEncoding class should not be used here, even on .NET
When I manually converted my UTF-8 encoded string to TBytes, everything
worked as expected.