SMF Support > SMF 2.0.x Support
Squares instead of letters
(1/1)
Illusive Man:
Hello, this is the first time I'm using SMF and I think it's great, but I've got a problem :S
I have Lithuanian UTF-8 locale installed and using it in the website and all letters work fine. But when I install new modifications such as spoilers and anti-bot, I can't use Lithuanian letters (ĄąČčĘęĖėĮįŠšŲųŪūŽž) in those modifications because they all appear as squares. I copy the English version, put it in the Modification.Lithuanian file and translate it.
MrPhil:
Is that Modification.lithuanian.php or Modification.lithuanian-utf8.php? I think that if you're using UTF-8 that all your language files must be *-utf8. [Can someone confirm this?]
When you edited the file(s), were you editing in UTF-8 mode? Be sure to check that. If you ended up editing in Latin-x, the codes will be incorrect for accented Latin characters. Check if your Lithuanian letters are one byte each (Latin-x) or 2 or 3 bytes each (UTF-8). And of course, confirm that your pages are actually displaying in UTF-8 (View > Character Encoding).
When you say the letters appear as "squares", do they have 4 hexadecimal digits inside each box? If a browser is presented with a character that it doesn't have in the installed font, it will output such a box. For example, I don't have Chinese fonts on my PC, so Chinese text shows up as nothing but boxes with numbers in them. Have you tried on another PC, or with another browser? If they're just plain squares, I suspect that you may not be in UTF-8 after all. It's also possible that you're looking at graphics and not browser-rendered text (CAPTCHA text is graphically displayed; I don't know about spoilers). If any of these mods use their own new database tables, check to see if those tables are in UTF-8 like the rest of the database.
Illusive Man:
--- Quote from: MrPhil on August 20, 2012, 10:41:47 AM ---When you edited the file(s), were you editing in UTF-8 mode?
--- End quote ---
That gave me an idea, I found out that I was saving the php file as ANSI instead of UTF-8, when I changed it to UTF-8 the squares were gone, though for some reason the picture for bot check (the one in registration where you need to enter letters shown on the picture) isn't showing up, it's just says image with a red x as if the image is supposed to be there, but is not found. :S When I bring the php file back to ANSI, the picture starts working again.
Navigation
[0] Message Index
Go to full version