I need to load HTML page from URL in my iOS app. The problem that the Arabic characters that are in this html page are shown as strange symbols.
I add <meta http-equiv="content-type" content="text/html;charset=utf-8"> but it dose not change.
Can anyone help me please?
Add unicode as your support in your html. try using the following in the head of html:
<meta charset="utf-8">
The Arabic characters should be included in utf-8 if I'm not mistaking. So your html should look something like this:
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8">
Related
I'm setting up a page for terms with firebase hosting. I deployed the page but my text in page shows as question marks. my text is in Arabic language.
I tried many answers, but none of them work.
maybe the problem in firebase hosting?
I tried:
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1256">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-6">
My Code:
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<body>
<h1 dir='rtl' lang='ar' >الشروط</h1>
<p dir="rtl" lang="ar">الشروط</p>
Code looks OK - just make sure your editor save it in UTF-8,
To verify this - download the file from the server as "yourfilename.html" and open it locally in your browser - see if you see it in Arabic.
If you don't, open it in notepad - you will probably see question marks which means you didn't save the file in UTF-8 format - you probably saved it as ASCII.
If on the other hand you will see it in Arabic - seek in the response structure you receive maybe something there is not right.
I have tried the following code. But still Charset header is missing, error is coming
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
I have used this line as well:
<meta charset="utf-8">...
but the error persists.
Try with removing / at the end of the meta tag.
Thanks.
Start your HTML-document like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Title</title>
</head>
...
I found a solution but it's not in META of page (I spent a few hours on this way), it's in server configuration, adding charset configuration in ngingx virtual server configuration
charset UTF-8;
I don't know about apache configuration but it should be very similar
try somethin like :
AddDefaultCharset utf-8
now I have a problem, while I type
curl -I www.w3sos.com (my testing environment)
I don't see the result, but when I use a web test solution like site analyzer it works ...
good luck, it was my 50 cents for this questions
greg
I have created web page using Chinese. When I view the page with Google chrome, all Chinese characters are corrupted. Do I have to add something in HTML page?
There are two ways to define the encoding of your page. You should include inside your <head> tags an encoding tag, two ways to do that follow below:
Short way:
<meta charset="utf-8">
Long way:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
You can have more details about the difference between these two ways in this question:
<meta charset="utf-8"> vs <meta http-equiv="Content-Type">
If you want to see a real example, take a look in the weibo.com source code at this line of code.
Make sure to use UTF-8 or a comparable encoding.
This can be made sure in the http headers:
Content-Type: text/html; charset=utf-8
use utf-8 character set otherwise it will all be code
remember <meta charset="utf-8"
Ensure you are using the UTF-8 character set
In my html document, I have my html as:
<html>
<head><title>title</title></head>
<body> <div>विजय कदम</div> </body>
</html>
I am getting output as:
विजय कदम
Any idea? what do I need to specify?
Save your file in UTF-8 encoding
Add meta tag to the html to support UTF-8
Make sure your server supports UTF-8 encoding, an example for Apache.
How to change the page encoding to UTF-8:
Add the following tag to the HTML:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Or the HTML5 equivalent:
<meta charset="utf-8" />
for more information about characters encoding check this out.
You need an editor that saves in Unicode UTF-8.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
you can also use a converter to display hindi. link: http://vikku.info/indian-language-unicode-converter/hindi-unicode-converter.html what you do is, you paste html text. Hope this helps!
I have a french website, the below is my header.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
I am trying to put these charactors ù,é it turns in to �
Please tell me why?
Thank you.
I am trying to put these charactors ù,é it turns in to �
That is a pretty certain indicator that the text you output is not UTF-8 encoded as you say in the header. My guess would be it's ISO-8859-1 encoded.
This can be because
The HTML file you are editing isn't UTF-8 encoded. Save it as UTF-8 - the option for that is often in the "Save As..." dialog of your editor or IDE.
The database connection you are getting the text from isn't UTF-8 encoded.
You need to save the html file as UTF-8 format. Also you can add an attribute lang="fr" to your html tag.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
You can use the following code in head section
<meta http-equiv="encoding" content="text/html" />
I think it will works for you.