[fpc-pascal] XML with lazarus UTF8 problem

Marc Santhoff M.Santhoff at web.de
Mon Jul 6 14:14:31 CEST 2009


Moin Hinnack,

Am Montag, den 06.07.2009, 11:28 +0200 schrieb Henrik Genssen:
> using UTF8Encode / UTF8Decode does not make any change
> I used that already - even leaving it out does not work.

I have used that routines for using XML files encoded similarly to
yours.

After reading the file to a DOM treee I'm putting some strings into
GTK-components like this:

  stitle := UTF8Encode(widestring(entry.Title));

(Where entry is a structure pointing to the DOM tree.)

And the umlauts are shown as expected. Did you add "cwstring" to the
uses clause of your program?

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, cwstring, ...

HTH,
-- 
Marc Santhoff <M.Santhoff at web.de>




More information about the fpc-pascal mailing list