[Lazarus] JSon stream to unicode?

Michael Van Canneyt michael at freepascal.org
Fri Nov 12 22:04:06 CET 2010

On Fri, 12 Nov 2010, Leonardo M. Ramé wrote:

> Hi, I'm receiving from a Delphi 7 app a unicode Stream (from Synapse
> library) containing Unicode data and I need to show it in a Lazarus
> form. How can I convert it to look correctly on screen?.
> Example:
> The string "Leonardo Ramé" is shown as "Leonardo Ram\u009".

If you're using the fpJSON unit, it's currently not UTF-8 tested.
It *should* work - insofar that unicode escape sequences are recognized and
converted. I've never tested that, though.

Also, if you're on linux, make sure you're using the cwstrings unit.


More information about the Lazarus mailing list