Conversion of buffer of UnicodeChars to AnsiString

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Conversion of buffer of UnicodeChars to AnsiString

LacaK
Hi,

is there smarter way how to convert buffer of UnicodeChars to AnsiString
taking into account codepage conversion as:

as := String(UnicodeCharLenToString(buffer, buflen shr 1));

?

And second question if I want to avoid warnings: "Implicit conversion
from WideString to AnsiString ..." in cases:

as := ws;

I must use only explicit typecast:

as := AnsiString(ws); ?


-Laco.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal