In the website I'm developing there are several european characters such as ã or ç. I was told to change from UTF-8 to ISO-8859-1, but ISO doesn't seem to code these characters correctly, while UTF-8 marks several others as question marks. Right now, the tag on my header is this one:
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
Use only UTF-8 if you want to avoid problems, the ISO encodings will bring you nothing good.
Related
I'm trying to make some text in czech, but I can't success :-/
Web is http://esn.zcu.cz/world/
formate of the file and in meta is iso-8859-2 which should allow czech chars
Your webpage has <meta charset="charset=utf-8"> and yet it isn't in UTF-8. Firefox interpreted it as ISO-8859-1, which makes vowels like éóí look okay, but then č you typed is being displayed as è.
Solution? You can fix the meta tag, but seriously, it's 21st century, you really should use UTF-8 everywhere. Convert the page to UTF-8, remove <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> and you'll be fine.
Note: your HTTP server returns this: text/html; charset=ISO-8859-1
I have some special characters in UTF8 format which I want to display. First I tried to read the origin (JSON) as UTF8 having also any kind of UTF8 meta tags in the header:
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-type" content="application/json; charset=utf-8" />
As this did not work, I transfered the special characters to HTML syntax and tried (with and without the UTF-8 headers) to get it displayed. But somehow I even do not get this. Here is the text I can add in a simple HTML file, which is then not displayed correctly.
It's Possible! � Our Experiences
I also tried this page with the ISO-8859-1 charset, but this does not work as well. I hope someone can help me.
Thanks,
Katja
If � is literally the text you get in your JSON, there's nothing you can do. � is the HTML entity for the UNICODE REPLACEMENT CHARACTER �, i.e. the Unicode character which is inserted when something went wrong.
This points to the original text having been screwed up by the originator. There's no way to know what that character was supposed to be before it screwed up and got replaced by �.
I wrote html page that displays mixed hebrew/english content.It works fine with charset "windows - 1255"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html dir="rtl" lang="he">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
,But I figured that people will have trouble if their machines doesn't support hebrew. I changed the charset to utf-8 and got
HTML:
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
View:
"��� ��� ������, ��� ����� �����, �� ������ ���� ��� ���� �� ������"
Read zohar ��� ����
....
Isn't utf-8 suppose to support more chars then windows 1255?
I guess when you changed the tag, you didn't tell your editor to convert the file to UTF-8. So, the file is still in Windows-1255 format, but the browser tries to read it as if it was UTF-8, so you get bad/unreadable characters.
I have no idea which editor you're using, so i can't tell you how to put it in UTF-8 mode. Try to find a setting in your options regarding the character set to use. Or, open the file in Windows notepad, and when saving it, make sure you select "Codepage: UTF-8" from the drop down box next to the save button.
Relation to Unicode
The Unicode Hebrew block (U+0590–U+05FF) follows Windows-1255 by encoding both letters and vowel-points in the same relative positions as Windows-1255. Unicode goes further in encoding cantillation marks in lower positions. Unicode Hebrew is always in logical order.
For modern applications UTF-8 or UTF-16 is a preferred encoding.
Source: http://en.wikipedia.org/wiki/Windows_1255
It seems to me that your encoding should still work if your characters are within the Unicode Hebrew block.
I have a email template, that has French copy. If I load this email template up in IE I receive square boxes where the accented characters are. How can I combat this? I assume it is down to encoding?
Ensure the HTML template has the correct meta tag in the header for Content-Type.
You did not specify if the encoding is Latin1, UTF-8 or other - you need to find out first in order to use the right value.
Here is what a UTF-8 meta tag would look like:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Just make sure that the actual encoding of the textfile (I assume it'll be either ISO-8859-1 or UTF-8) is in accordance with the meta tag defining the encoding in the beginning of the file. e.g.:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
see http://en.wikipedia.org/wiki/Character_encodings_in_HTML
the page in question is Apple Amor
You can see that in the footer the spanish vowels seem to be showing properly , but in the slide down bar(header) they get messed up.
Any ideas why ?
Your page is encoded in ISO-8859-1. Wherever that header comes from, it is most likely encoded in UTF-8.
You would have to change the character set of your page to UTF-8 (that would probably have some consequences) or convert the incoming data from the header. I don't know where it's coming from, so it's hard to tell what the right method would be.
Mandatory basic reading on the issue: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
Your page source shows that you're using:
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
Note that the above tag is not well formed. Where is its closing character "/"? Content-Type should be between double quotes.
Add this tag to your page and test:
<html lang="es">
If that doesn't solve your problem try to change the charset tag to:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />