NetTalk Central

Author Topic: Extended characters (again)  (Read 3038 times)

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Extended characters (again)
« 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]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Extended characters (again)
« Reply #1 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

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Extended characters (again)
« Reply #2 on: August 29, 2013, 08:03:21 AM »
Hi Bruce,

The string contains ANSI characters.

Cheers,
/Poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Extended characters (again)
« Reply #3 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


Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Extended characters (again)
« Reply #4 on: August 29, 2013, 10:10:21 PM »
Thanks Bruce.
Issue solved.

/Poul