473,769 Members | 3,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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_c lient | utf8
|
| character_set_c onnection | utf8
|
| character_set_d atabase | latin2
|
| character_set_r esults | utf8
|
| character_set_s erver | latin1
|
| character_set_s ystem | utf8
|
| collation_conne ction | utf8_general_ci
|
| collation_datab ase | latin2_general_ ci
|
| collation_serve r | 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:

<%@LANGUAGE="VB SCRIPT" CODEPAGE="28592 "%>
<%
Response.Charse t="ISO-8859-2"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
<title>Test ADO Connection</title>
</head>
<body>
<%
objConn.Open "Driver={My SQL ODBC 3.51 Driver}; Server=serverna me;
Port=3307; Option=16387; Stmt=SET NAMES 'latin2'; Database=evol_l atin2;
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 />")
Next
%>

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,
Larry.
Jun 27 '06 #1
0 2362

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11763
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem I have is I cannot retain the primary key field in a variable which is then used in a SQL update...
6
5706
by: Juergen Gerner | last post by:
Hello Python fans, I'm trying and searching for many days for an acceptable solution... without success. I want to store files in a database using BLOB fields. The database table has an ID field (INT, auto_increment), an ORDER field (INT, for knowing the right order) and a "normal" BLOB field. It is planned to split large files in 64k-parts and sort these parts by the ORDER field. Here's some pseudo code how I wanted to implement this...
0
1845
by: Steffen Gebert | last post by:
Hello, I want to fetch the page via php from a mysql-db, which is called by an emulated filename (mod_rewrite, but that might be unimportant). So I have a file, which is called by guestbook.html - so I have to find the entry in my db, where the page title is guestbook. But there isn't a only column for this virtual filenames, but only entries like "Guestbook", "This & much more..." and so on. Becaus I'm not able to use "This & much...
9
17075
by: Ash Christopher | last post by:
Is there a way to store images in a mySQL database? I was hoping to store them in a table, then use php to call them from the database and display the picture on a webpage. Any help would be appreciated.
20
1739
by: tigrfire | last post by:
I need the following code to return a string of character stored in array and also return the size of the array. I want to do it without using pointers and so far have the character storing working fine, it's just that I can't really think of a way to return the number of characters in the array. Anyone help me out? int inputPhrase() { char msg, ch; int i = 0;
2
5632
by: AmigoFd | last post by:
Hello, This problem is really driving me crazy ... * I have a mySql database which is latin1_swedish_ci * In my web.config I have: <globalization requestEncoding="ISO-8859-2" responseEncoding="ISO-8859-2" fileEncoding="iso-8859-2" culture="pl-PL" uiCulture="pl-PL" />
3
1322
by: Diwa | last post by:
In TC++PL 3edn, in section 21.2.2, Stroustrup notes that put( ) and write( ) simply write chars. Therefore, << for outputting chars need not be a member What does he mean here ? Also, class basic_ostream does not have operator << (char ch)
4
3689
by: robert.szczepanski | last post by:
Hi everybody; I can't change polish sign to small letter. This is my php script: <?php setlocale(LC_ALL, "pl_PL.UTF-8") ; //this function return "pl_PL.UTF-8"
0
1381
oll3i
by: oll3i | last post by:
i have created a database with latin2 charset and latin2_general_ci collation i also tried utf8 and utf8_polish_ci collation but i get an error mysql> INSERT INTO `candidate_provinces` VALUES(1, 'dolnośląskie'); ERROR 1366 (HY000): Incorrect string value: '\x98l\xA5ski...' for column 'provin ce' at row 1 when i insert some words with polish diacritic characters THANK YOU
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.