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 (;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!

Who is Participating?
selohConnect With a Mentor Commented:
It would be something like this in ASP:
  Function translate(string)
    convertor = "&#945;@&alpha;|&#946;@&beta;|.....etc"
    convertor = split(convertor, "|")

    loops = UBound(split(convertor, "|"))

    FOR i=0 TO loops
      loopy = split(convertor(i), "@")
      string = replace(string, loopy(0), loopy(1))
  End Function
This function has to be preformed before you send it though!
vpikulaAuthor Commented:

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!
vpikulaAuthor Commented:
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...)
vpikulaAuthor Commented:
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,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.