[fpc-pascal] cwstrings unit and UTF8Decode()

Martin Schreiber mse00000 at gmail.com
Fri Mar 25 15:06:11 CET 2016


On Friday 25 March 2016 14:48:18 Graeme Geldenhuys wrote:
> On 2016-03-25 12:20, Bart wrote:
> > If you're using LazUtf8 (or use LCL) then cwstring will be used in your
> > app.
>
> I don't use LCL at all, pure RTL & FCL code only. Based on the fact that
> LCL's code also requires "cwstrings" I assume my original assumptions is
> correct, that if I want to do any UTF8-to-UTF16 conversions, use
> UTF8Decode etc, my applications (or frameworks) require "cwstrings" for
> now.
>
You can use the MSEgui functions in lib/common/msestrings.pas (stringtoutf8(), 
stringtoutf8ansi(), utf8tostring(), utf8tostringansi(). AFAIK both LCL and 
Free Pascal RTL also have such functions.

Martin



More information about the fpc-pascal mailing list