By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,495 Members | 1,298 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,495 IT Pros & Developers. It's quick & easy.

Storing and outputting Polish chars with MySql v5.0 and ASP

P: n/a
Hi there,

I'm currently trying to implement a website that will store and retrieve
Polish, so I need to be able to handle Polish characters using classic ASP
with MySql5.

Does anybody have an experience of doing this as I'm banging my head against
a brick wall getting this to work using either utf8 or latin2. I can't
believe I'm the first person in the world to want to do this! I've input
Polish characters directly into the database and the database is storing
them correctly, but when I write them out to the webpage I'm just getting ?s
for the Polish characters.

My setup is:

MySQL 5.0.18nt
MyODBC 03.51.11
IIS 6.0

The database variables are :

| character_set_client | utf8
| character_set_connection | utf8
| character_set_database | latin2
| character_set_results | utf8
| character_set_server | latin1
| character_set_system | utf8
| collation_connection | utf8_general_ci
| collation_database | latin2_general_ci
| collation_server | latin1_swedish_ci

The table has the Character Set as Latin2 and the varchar and text fields
are also Character Set Latin2.

My ASP Code is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
<title>Test ADO Connection</title>
objConn.Open "Driver={MySQL ODBC 3.51 Driver}; Server=servername;
Port=3307; Option=16387; Stmt=SET NAMES 'latin2'; Database=evol_latin2;
Uid=user; Pwd=;"
objConn.Execute "SET NAMES 'latin2'"
objConn.Execute "SET CHARACTER SET 'latin2'"
objRs.Open "SELECT * FROM utf8_test", objConn, 1
For Each Field In objRs.Fields
Response.Write("Field '" & Field.Name & "' has value '" & Field.Value &
"<br />")

I've tried all the above with the database and asp code set to utf8 and am
having the same problems.

Any suggestions would be much appreciated.

Kind Regards,
Jun 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.