473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Eatern-european characters

Hi,

I am using an ACCESS-database to store Slovak words. Those words may
contain special characters like : ÄŒ ÄŽ Äš Ľ Ň ŘÅ* Ť Ž.
When I want to retreave and show those words in IE using ASP, those
characters are replaced by a questionmark! I suppose I need to use
codepages, and I have done quit som research on the internet but I can
not get it to work properly...
Who can help me with this ???

Thanks,
Janošik.

Oct 24 '07 #1
4 2129
"Janosik" <ja*@vlaamsemolshoop.bewrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
>Hi,

I am using an ACCESS-database to store Slovak words. Those words may
contain special characters like : C D E L N R S T Z.
When I want to retreave and show those words in IE using ASP, those
characters are replaced by a questionmark! I suppose I need to use
codepages, and I have done quit som research on the internet but I can
not get it to work properly...
Who can help me with this ???

Make sure you save your ASP pages are saved using UTF-8 encoding.

Add in the top your pages:-

<%@codepage=65001 %>

Also add in the code of your page:-

Response.CharSet = "UTF-8"

Are using HTML forms where the user may enter such characters that are then
posted to an ASP page to be saved in the DB? If so and your receiving pages
were not set to the correct codepage you may have some corrupt data in your
DB.
--
Anthony Jones - MVP ASP/ASP.NET
Oct 24 '07 #2
Hi again,

I found some PHP-code that works fine, but I can't get it to work in
ASP :

$mysql_id=mysql_connect("$dbhost","$dbuser","$dbpa ss");
mysql_query("SET CHARACTER SET 'utf8'", $mysql_id);

What's the ASP-version for this last line?
It should explicitly define encoding in which data are transferred
from the database.

Thanks and best regards,
Janošik.

Nov 6 '07 #3
"Janosik" <ja*@vlaamsemolshoop.bewrote in message
news:11*********************@19g2000hsx.googlegrou ps.com...
>Hi again,

I found some PHP-code that works fine, but I can't get it to work in
ASP :

$mysql_id=mysql_connect("$dbhost","$dbuser","$dbpa ss");
mysql_query("SET CHARACTER SET 'utf8'", $mysql_id);

What's the ASP-version for this last line?
There isn't one. ASP doesn't provide the same seamless DB access functions
that PHP does for MySQL. I would guess you would need an ADODB connection
using an ODBC provider and the MySQL ODBC connector. You may then be able
to execute this command using the connection execute method.
However whether that is useful or not I can't say.
>It should explicitly define encoding in which data are transferred
from the database.
Yes it should see the client (thats the Web server in thisc case) as a
Unicode user. All strings in ADO and VBScript/JScript are unicode. IIRC
correctly there is a configuration setting somewhere in MySQL which
specifies what assumption it can make about the codepage the client is
using. I could be wrong MySQL isn't common in ASP development.

Once the string is retreived correctly from the DB Server as unicode string
it can be written to the browser using the techiniques I've already posted.

BTW, why not just stick with PHP?

--
Anthony Jones - MVP ASP/ASP.NET
Nov 6 '07 #4
On 6 nov, 14:59, "Anthony Jones" <A...@yadayadayada.comwrote:
>... Â*You may then be able to execute this command using the connection execute method.
I used this command :

objConn.Execute "SET CHARACTER SET UTF8"

and it finally works :-) !

However... it seems to me there still is something strange going on...
I used the command ONCE ine ONE ASP-test... and it worked!
Suddenly, all the other ASP-tests also work, even without inserting
the command.
The PHP-tests however only work WITH the command...
BTW, Â*why not just stick with PHP?

--
Anthony Jones - MVP ASP/ASP.NET
well... I think I don't know enough about PHP to succesfuly complete
this project :-/
I know... it should exactly be a reason to stick with PHP, but .....

anyway, thanks a lot for the super-tips you gave me!

Best regards,
Janošik.
Nov 6 '07 #5

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

Similar topics

17
by: Pikkel | last post by:
i'm looking for a way to replace special characters with characters without accents, cedilles, etc.
7
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP,...
6
by: barthome1 | last post by:
Hello, My company collects data from non-US sources. We are starting projects where this data will be output in an XML document and passed around to our applications and third party tools. ...
4
by: mikeyjudkins | last post by:
I have an XML file containing localized strings in 9 languages, encoded in Unicode (UTF-8). Im trying to parse this XML document via XSLT (Apache Xalan) to selectively render localized strings...
9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
43
by: Vladimir | last post by:
Method UnicodeEncoding.GetMaxByteCount(charCount) returns charCount * 2. Method UTF8Encoding.GetMaxByteCount(charCount) returns charCount * 4. But why that? Look: /* Each Unicode character...
4
by: wob | last post by:
Many thanks for those who responded to my question of "putting greek char into C string". In searching for an solution, I noticed that there are more than one version of "Extended ASCII...
20
by: SMG | last post by:
Hi All, I have created an application which is working fine and is in about to launch, now suddenly my mgmt says there are chances that Scrip ID( a particular id and not prim key) may have special...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
3
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
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...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.