String to Unicode?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

String to Unicode?

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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: String to Unicode?

John Coppens
On Sat, 23 Jul 2005 17:00:15 +0200
Thomas Zastrow <[hidden email]> 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: String to Unicode?

Thomas Zastrow
John Coppens wrote:

>On Sat, 23 Jul 2005 17:00:15 +0200
>Thomas Zastrow <[hidden email]> 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


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