Anyname Donotcare
Anyname Donotcare

Reputation: 11423

arabic character viewing during runtime

I face the following problem : when i copy a specific page to my new solution :

in run time i get this !!

enter image description here

although it 's like this in the design time :

enter image description here

my .aspx :

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

i try to use charset=iso-8859-6 instead but the same problem !! How to fix this problem and why this happens ?

Upvotes: 3

Views: 2642

Answers (2)

Anyname Donotcare
Anyname Donotcare

Reputation: 11423

After several tries i just change the charset to windows-1252 and every thing goes okay.

Like this:

 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />

Upvotes: 4

Esailija
Esailija

Reputation: 140236

i try to use charset=iso-8859-6 instead but the same problem !!

That means your server is sending an actual Content-Type header with a charset. The <meta>-tag is secondary to an actual header.

You can do that using:

<%@ Page ResponseEncoding="UTF-8" %>

or

Response.ContentType = "text/html; charset=UTF-8";

But don't just hack blindly, it is easy to use Google Chrome developer tools (or whatever you prefer) to see what header your server sends:

enter image description here

Upvotes: 1

Related Questions