Link to home
Start Free TrialLog in
Avatar of vpikula
vpikula

asked on

Inputting Greek in a simple input form to SQL DB

Hello there experts,

This must be a rather simple question, but I need your help:

I have an intranet website that collects different languages such as English, Portugese, Italian, French, Japanese etc. The first languages I all handle with Unicode, the last with SHIFT_JIS.

However, now that we want to add Greek to it, I'm seeing problems not with the display side of things, but with getting form input to our SQL database. Let me explain:

Whenever I type Greek data using the built-in Windows Language Bar (http://support.microsoft.com/default.aspx?scid=kb;en-us;306993&sd=tech) DIRECTLY into SQL, the data is saved normally and displays fine when fetched in ASP. However, when I do the same thing and type the data in a web form first (displays fine) the data doesn't get saved in SQL proper.

Strangest thing is that our web applications are working fine for all those other languages...

This is the code I used for setting our web apps to Unicode:
strCharset = "UTF-8"
Response.Charset = "utf-8"
Session.Codepage = 65001
.......
<META http-equiv=Content-Type content="text/html; charset=<%= strCharset %>">

So this is what I did for Greek (since as with Japanese input, Unicode didn't work):
strCharset = "iso-8859-7"
Response.Charset = "iso-8859-7"
Session.Codepage = 1253
........
<META http-equiv=Content-Type content="text/html; charset=<%= strCharset %>">

Am I using the wrong charset or codepage here? Please advise!

Thanks,
Victor
Avatar of vpikula
vpikula

ASKER

Anyone??

Victor
I believe the problem lies in http, the form sends the data to the next page as ascii which doesn't support the greek alphabet.
My best bet is to create a javascript that converts the greek letters into ascii before sending them to the next page!

http://www.alanwood.net/unicode/greek.html
Avatar of vpikula

ASKER

That's a good point -- So I need to convert the form data to html codes first? Do you have a good function for that? (seems quite manual...)
ASKER CERTIFIED SOLUTION
Avatar of seloh
seloh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vpikula

ASKER

Hmmm yes that will do for converting it from Unicode to HTML codes I guess -- will give that a go and award you the points nonetheless, closing this old topic.

Many thanks,
Victor