UTF-8 & ISO-8859-2 Problem - html

I've got a problem with html encoding. I work on PSPad. I set utf-8 as charset in my files and utf-8 as a file format and it look fine on localhost but doesn't on a server.
When i change file format to iso it works on a server but doesn't on localhost and when i close PSPad and reopen the file it totaly breaks some of the characters.
Do u have any solution? It so annoying! :)
thanks
K.

Make sure that the foreign server sends a charset declaration as well. What server software do you use? In Apache you could achieve it by adding a .htaccess file with the following content:
AddCharset utf-8 .html
Also make sure that you add a
<meta charset="utf-8">
declaration (HTML5) or a
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
To the HTML file header.
Edit: corrected typos

Related

HTML Special Characters not rendered properly

I've setup VestaCP on a 2 identical Debian 7 Servers. Strangers on server one the special characters display properly out of the box, but on the Primary server, the special characters are not being rendered correctly, they give the black "?" instead. Both server's are exact same software and config. writes here..
I've tried setting
/etc/apache2/conf.d/charset
/home/admin/conf/web/apache2.conf
/etc/apache2/apache2.conf
in .htaccess
AddDefaultCharset UTF-8
AddCharset UTF-8 .html
but it doesn't resolve at all. Please help me.
Interestingly, the pages (quite and old site) use
in their header.
Please check page here : http://168.235.66.20:8080/
The data is encoded using Windows-1215 not UTF-8. You should convert it to UTF-8.
You should change in your HTML :
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
With :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Utf-8 does not work in php file

I use notepad++ for coding.
I have a test.php file which is encoded with UTF-8 without boom. I have set the charset in the head as
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
However, if I open the file in a browser special characters like "äüö" are not represented correctly. If I go to pageinformation in firefox I get
Coding: windwos-1252
Content-Type text/html; charset=utf-8
Why is the coding wrong? How can I change it?
You should use notepad.exe which comes with windows and click SAVE AS option and change encoding there to utf-8 instead of ANSI. Save it and check.
I had similar issues.
Hope this helped
what about utf-8 without bom?
It happens with certain text editors. Try notepad++ or similar ones.

Character encoding failing

I'm trying to set the encoding of some files in PHP to ISO-8859-1. I tried using this:
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">`
but it still isn't working. What can I do? Thank you.
You should be outputting this as a real HTTP header. <meta> elements are not a good substitute.
header('Content-Type: text/html;charset=iso8859-1');
You should ensure that the encoding of the files is actually ISO 8859-1 - all this does is tell the browser that the resource is in that encoding, it doesn't actually transcode or anything.

UTF-8 unreadable in phonegap android

I'm working on my first phonegap application, an android based simple form app.
My problem is that all my non-latin characters appear unreadable.
I added the content meta tag with utf-8, made sure I saved the file as utf-8, made sure to use font with the needed letters and also added xml:lang to the decleration.
Couldn't find any other idea, because i'm a web dev and this usually solves these issues...
Maybe someone has any idea?
feels like my questions back when I just started web development :)
Thanks!
Just add meta:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
If you are using Eclipse, which is default for the PhoneGap Android, make sure you applied the utf-8 text file encoding. (Project - Properties - Resource: Text File Encoding - Other [UTF-8]).
The meta tag should also be in your index.html
<head>
<meta charset=utf-8>
...
</head>
sometime it happens from visual studio page Unicode setting: for this go to file > advance save options > select Unicode utf 8 with signature and then click ok.

Charset UTF-8 doesn't work (stuck with these ?-marks)

I have a Unicode problem... I´ve done this before but for now, I cannot understand
why the Icelandic letters don´t show up - I have those question marks again
Here is the url (very plain and short html5)
http://nicejob.is/new/
Everything I Google says: use the <meta charset="utf-8"> as I do.
Any suggestions?
Your page is already viewed as UTF-8. But your source code is not saved as UTF-8.
Please change the encoding of your source code file to UTF-8.
Not all browsers support HTML5-way tags yet
here you can see table of compability
Try this instead:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
I can see a couple of issues.
The META should look like this:
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
The <html> specified lang="en" which might be prone to confusing some browsers.
When I view the HTML from the browser, the question marks are encoded as 0xEF 0xBF 0xBD, which is the UTF-8 encoding for the byte order mark or BOM, aka U+FEFF. So, for whatever reason, the HTML is not transmitted as sensible UTF-8 (though it does seem to be valid UTF-8).
Probably you are using some text editor like notepad++,
and you didn't set up encoding to UTF-8 in that text editor.
What you have to do is to save the file with utf-8 encoding by using Notepad (the attached one with Windows).
Steps:
Save as ..
In the below options ... you will find encoding option choose UTF-8 ...
And save the file ...
Then add the line <meta charset="UTF-8" /> inside your file ...
And it will work.