Results 1 to 3 of 3
Thread: Language display problem
Aug 24, 2013, 03:07 #1
- Join Date
- Sep 2007
- 0 Post(s)
- 0 Thread(s)
Language display problem
Does anyone know why squares display on my website when using different language, such as Nome de usuárioAnimated Chatrooms - www.121chatrooms.net
Aug 24, 2013, 19:12 #2
- Join Date
- Jul 2003
- Northeastern USA
- 56 Post(s)
- 1 Thread(s)
We need more information.
Are you viewing the website through google translate?
Does your website have built-in multilingual features?
Is a visitor trying to use those features, or is their computer simply set to another language?
Aug 30, 2013, 11:50 #3
Does anyone know why squares display on my website when using different language, such as Nome de usuário
- Join Date
- Aug 2007
- 51 Post(s)
- 2 Thread(s)
- the server might not send headers stating the charset, and your browser made a bad guess
- the server may be sending a header stating a charset, but the document was saved under a different charset (the browser will listen to the server, except sometimes IE6 will use a compliated set of ingenious Soviet-based heuristics to make an edjumacated guess at the saved document's charset, the basis of the utf-7 exploit)
- the server and document may agree, but you stubbornly set an incompatible charset within your browser (I'm not sure where this setting is anymore on browsers, used to be under View->Character set or similar but everyone's so damned pleased with themselves for having found nefarious ways of hiding menus for the lawlz it wouldn't surprise me if the likes of Mozilla have actually just removed it "because it's too complicated for users and only web developers need it so we recommend you use a plugin").
This should *NOT* matter what language the browser is set to! unless this sets the expected charset to Stubborn
So if I have a document saved as Latin-1 (iso 8859-1) and I go to a Japanese language website and copy some text there and paste it into my document, I may or may not get squares/questionmarks/diamonds instead of the correct characters because there should not be any Latin-1 representation for Japanese characters.
Saving the file as iso-2022-jp (or any of the other ones) might not fix the Japanese text, if my editor made sh*t up when originally getting the Japanese text and now it might be trying to represent garbage as 2022 and I am made of fail.
Usually the solution to all our problems including hunger AIDS and peace in the middle east is to encode and save and store and represent everything as utf-8. This is a charset capable of showing whichever letters of whichever language you want to have. Most charsets are limited and specific to one or a few alphabets. UTF-8 by its powers combined turns into a giant mecha, fights evil and the NSA and WINS.
Make sure your document is saved as UTF-8. No BOM and nothing weird.
Make sure your meta tag in the HTML matches (this only exists in case your server is being silly and not sending out a header).
Make sure your server is correctly saying "WITNESS! THIS DOCUMENT IS UTF-8 YO".
Make sure your browser isn't set to stubborn. Usually auto-detect is fine.
Make sure your database, if you're using one, is not being retarded about charset.
Don't blindly copy and paste strange things and add it to the document.
Don't mix stuff from Windows editors and stuff from *nix. This has caused me no amount of grief, though this has nothing to do with character boxes and everything to do with whitespace hell. If you're getting documents from others maybe written in Word or something, find a program to sanitize the Windowy-ness out of it first if possible. I think someone sells a kind of
bug sprayprogram that kills off magic quotes and control characters and ^Ms but you'd have to check your local MegaMall to see.