Linux Server Character Encoding - what do I need to install?!?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Linux Server Character Encoding - what do I need to install?!?
Hello!
I hope somebody can help...we have a dedicated linux server for our web hosting services which we purchased a few months ago...however the support is limited and every time we ask for assistance we are told to find the answer ourselves and pay the techies to install our solution! Anyway... we seem to have issues with character encoding on our websites - any text that isn't fully ASCII coded is outputted as funny symbols - for example:
Acting as a “4 PL†– we will manage your operation, achieving agreed service and cost.
Should read as:
Acting as a 4 PL we will manage your operation, achieving agreed service and cost.
This is text that is updated via a CMS, and our clients do not code any HTML at all so obviously this is a problem! Does anyone know which library I need to install on our linux box so that these characters are processed properly in the first place?
We have the same problem on other sites - sites that had worked on our old windows server suddenly started outputting the funny characters until we changed the coding on the pages....
The problem can be in one of many levels, and not necessarily in Linux.
Your CMS (or whatever) needs to produce sane pages that comply with one of the W3C standards. So, the first question I ask is: what HTML version are you using? (as in HTML 4.01, XHTML 1.0 Strict/Transitional, whatever else). This is critical.
Second question, have you validated the resulting web pages against the W3C validator? In the case it applies, do your web pages have a valid header with a correct doctype and a correct chatset setup. The way to do this will of course depend on the doctype you choose. Each one has its own rules. If everything is correct, then you shouldn't need to change anything. The fact that your web server is running in one or another OS shouldn't be a thing to worry about these days if your setup is correct. But it will be most times because of incorrect setups that doesn't adhere to any standard and rather rely on peculiarities of one or another concrete web browser.
ps. If the problem does only appears in the dynamic contents and not the static text it could also be an issue with your databases.
The site has the following document type and character set:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
The W3 validator confirmed this was OK...
Also - the problem occurs in all elements on a page - the static website content and that dynamically generated...I am just most concerned about the info pulled from the database because it is that which our clients update who will not code...
Also - this site has been working as is (no changes to the source code) on a different server, so I can only deduce that the problem is on our server...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.