Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-07

String to Unicode?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thomas Zastrow

Hi there,

I'm producing some XML-Output with a FPC-program. The problem is that there are special charakters like < and > in the content of some tags, also some german special charakters which has to be encoded into &gt; and so on.

Are there any functions like "String to unicode" or so for doing this automatically??

Thanks again,

Tom

John Coppens
to Thomas Zastrow
Show quoted text 9 lines
Hi there, I'm producing some XML-Output with a FPC-program. The problem is that there are special charakters like < and > in the content of some tags, also some german special charakters which has to be encoded into &gt; and so on. Are there any functions like "String to unicode" or so for doing this automatically??

Hi Tom...

Is there some confusion? I believe you mean html entities ( &gt; is an html entity, not unicode). Did you check the libxml2 library? This library has the necessary escaping routines to hide those special routines.

On the other hand, character set coding can also be done with the library.

John

Thomas Zastrow
to John Coppens
John Coppens wrote 27 lines
On Sat, 23 Jul 2005 17:00:15 +0200 Thomas Zastrow wrote: >Hi there, > >I'm producing some XML-Output with a FPC-program. The problem is that >there are special charakters like < and > in the content of some tags, >also some german special charakters which has to be encoded into &gt; >and so on. > >Are there any functions like "String to unicode" or so for doing this >automatically?? > > Hi Tom... Is there some confusion? I believe you mean html entities ( &gt; is an html entity, not unicode). Did you check the libxml2 library? This library has the necessary escaping routines to hide those special routines. On the other hand, character set coding can also be done with the library. John

Hello John,

sorry, certainly you arre right, I need something to transform special charakters to HTML-Entities. If there is nothing already I'l write a function whith a lot of StringReplace-Calls ;-)

Greetings,

Tom