Avatar of rivkamak
rivkamak
Flag for United States of America asked on

utf characters from SQL to ASP page

i have a field in my sql table with hebrew characters. The field type is varchar. In my database the information can be read with real letters.
When I try to pass that information onto my asp page, I am getting just ??

The asp page is utf encoded:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

What do I need to adjust?
ASPMicrosoft SQL Server

Avatar of undefined
Last Comment
rivkamak

8/22/2022 - Mon
Scott Fell

In my database the information can be read with real letters.

What is actually being stored in your database?  If you simply use  hebrew characters with utf8 is should work.  Are the characters stored correctly in the dbf when you look directly at the data?
rivkamak

ASKER
How do I know how the information is stored.
It looks like real hebrew letters to me in the database
Scott Fell

so when you use ms sql server manager studio, and open the table, you can see the hebrew characters?

If you start a new blank pages like below what happens?

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>
</head>

<body>
place raw hebrew character here 
</body>
</html>

Open in new window


then

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>
</head>

<body>
<%=rs("FieldWthHebrew")%>
<hr>
<pre><%=rs("FieldWthHebrew")%></pre>
</body>
</html>

Open in new window

Your help has saved me hundreds of hours of internet surfing.
fblack61
rivkamak

ASKER
Besides for my dynamic content the rest of the page is full of hebrew characters that show up just fine.

even if I start a new blank page and tried putting my dynamic information on it, it also shows up with ???
Scott Fell

I think you need to change varchar to nvarchar
rivkamak

ASKER
sorry it is nvarchar.

actually there is a page where I have an admin section for our administrator to view the information from the table and add new data, the text does come through properly.
Yet, not on this page:

http://www.oorahhakitzah.co.il/
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
G_H

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
pateljitu

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
rivkamak

ASKER
Thank you