Reputation: 1571
Im developing a website with some indian unicode characters, I have xampp installed on my pc and when I test on my local server, unicode characters are showing fine, but when i upload it to web server all the unicode characters are showing like ?? marks....
My web server is Linux based, So Can anybody help....
This is from my website:
This is from my local web server:
Upvotes: 4
Views: 2859
Reputation: 117314
Be sure that your server uses UTF8 as default-charset(maybe you'll need to modify the server-settings).
AddDefaultCharset utf-8
Put the line above to your httpd.conf(if possible...then restart the server) or to a .htaccess
-file on the top-level of the DOCUMENT_ROOT(no restart needed)
Declaring the charset via the meta-tag will not be sufficient, it will be overridden by the charset-header(if any exists) sent by the server.
You also can send the header from within your scripts:
<?php header('Content-Type: text/html; charset=utf-8'); ?>
Upvotes: 2
Reputation: 1266
You need to declare the character set is UTF-8 in your HTTP headers, the way to do that depends on your server: http://www.w3.org/International/O-HTTP-charset
If you don't feel like configuring your web server you can also use a <meta http-equiv>
tag in the <head>
of your web page, which can be equivalent to an HTTP header.
Upvotes: 0
Reputation:
Make sure you declare your charset as utf-8 in your html, like in this example from the Mozilla docs:
<!-- Defining the charset in HTML4 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- In HTML5 -->
<meta charset="utf-8">
Upvotes: 0