NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Poul Jensen on August 28, 2013, 12:51:05 PM

Title: Extended characters (again)
Post by: Poul Jensen on August 28, 2013, 12:51:05 PM
Hi,

I have previously a problem with extended characters that was solved setting webserver charset to Utf-8.
Now all is OK in browses and forms.
But if I display a message in the header like this in PageHeaderTag:
    packet = '<strong>Velkommen ' & clip(l:Kundenavn)  & '</strong>'& p_web.CRLF
    do SendPacket

It does not work, but I get questionmarks instead.  See attached.

What could I be doing wrong ?

Cheers
/Poul


[attachment deleted by admin]
Title: Re: Extended characters (again)
Post by: Bruce on August 28, 2013, 10:43:23 PM
does l:Kundenavn contain an ANSI string (ie ascii chars from 1 to 255 in Danish code page) or a utf-8 (unicode) string?

cheers
Bruce
Title: Re: Extended characters (again)
Post by: Poul Jensen on August 29, 2013, 08:03:21 AM
Hi Bruce,

The string contains ANSI characters.

Cheers,
/Poul
Title: Re: Extended characters (again)
Post by: Bruce on August 29, 2013, 09:42:57 PM
pass your string through the Translate method. eg

packet = '<strong>Velkommen ' & p_web.Translate(l:Kundenavn)  & '</strong>'& p_web.CRLF

Title: Re: Extended characters (again)
Post by: Poul Jensen on August 29, 2013, 10:10:21 PM
Thanks Bruce.
Issue solved.

/Poul