NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on May 24, 2009, 06:45:38 AM

Title: Unicode, Russian, Chinese, etc
Post by: Alberto on May 24, 2009, 06:45:38 AM
Hi,
My backend is a Ms Sql 2005/2008
I need to save data in unicode languages like Russian
My string columns in sql are varchar.
I´ve change some to nvarchar (mssql unicode varchar)
Open a form, write Понедельник (Monday), save it, open it again and I see
1042; 1086; 1089; 1082; and so on
And that´s what I see saved in the sql table.
I´ve changed the Regional seting too but... same behaviour.

How can I do it?

Thanks
Alberto
Title: Re: Unicode, Russian, Chinese, etc
Post by: Bruce on May 24, 2009, 09:39:20 PM
I've no experience with this.

I'm pretty sure you can't use unicode in a normal clarion program - the biggest problem being the display of the characters on the screen.

In a web app you may have some success storing the data as "encoded values" - and then setting your html page encoding. The default is iso-8859-1, but you can change it on the WebServer advanced tab.

You'll need to do some research though as you're breaking new ground here.

Cheers
Bruce
Title: Re: Unicode, Russian, Chinese, etc
Post by: Alberto on May 25, 2009, 06:49:30 AM
Bruce,
I'm reseaching and learning.
Someone send me the following code to be use in a win32 C6 app
SetTheFonts Routine
 Case Local:FontType
   Of 1 ! russian
    SetFONT(?Browse:1,'Arial Unicode MS',,,,CHARSET:CYRILLIC)
   ! SetFONT(?CUS:Name,'Arial Unicode MS',,,,CHARSET:CYRILLIC)

   Of 2 ! greek
    SetFONT(?Browse:1,'Arial Unicode MS',,,,CHARSET:Greek)
   ! SetFONT(?CUS:Name,'Arial Unicode MS',,,,CHARSET:Greek)
  End

Setwindowfont Routine
 Case Local:FontType
   Of 1 ! russian
    SetFONT(0,'Arial Unicode MS',,,,CHARSET:CYRILLIC)
   Of 2 ! greek
    SetFONT(0,'Arial Unicode MS',,,,CHARSET:Greek)
  End
  Update
  Display


Is this of any help?
Thanks
Alberto
Title: Re: Unicode, Russian, Chinese, etc
Post by: Bruce on May 25, 2009, 08:05:03 AM
helps you select an appropriate font for a windows program, but is completely unrelated to html pages.

cheers
Bruce