Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Grasshopper on May 28, 2012, 03:37:29 PM

Title: Foreign characters don't show up
Post by: Grasshopper on May 28, 2012, 03:37:29 PM
We installed the forum on our website. On every part of the forum, the characters "Ű" and "Ő" don't show up, and there is a questionmark instead. I know they are not very usual but we use them in Hungary  :) The short form of these vowels "ö" and "ü" do appear correctly.
What can we do?
Title: Re: Foreign characters don't show up
Post by: emanuele on May 28, 2012, 03:51:42 PM
Welcome to Grasshopper.

These chars dosn't appear in the text of the posts or around in the language strings of the forum?

In the latter probably you installed SMF as utf8 and used a non-utf8 language pack or vice versa. ;)
Title: Re: Foreign characters don't show up
Post by: MrPhil on May 28, 2012, 04:59:43 PM
In the Language Packs, there is a Hungarian (ISO-8859-x encoding) and a Hungarian-utf8 (UTF-8 encoding). It sounds like you installed the Hungarian instead of Hungarian-utf8 on your UTF-8-configured system. If you did, simply remove the Hungarian language from the admin section, and download and install the Hungarian-utf8 language pack.

If this is not what happened, please give us the details. Is your forum configured for UTF-8? (if not, what?) Are pages displaying in UTF-8? Which Hungarian language pack did you install? Is your database set up as UTF-8? Was the forum UTF-8 from the beginning, or did you start out as Latin-x and have posts still in that encoding? (The database should have been converted to UTF-8 as part of the conversion). Are the accented letter errors in prompts and labels, posts and other database text, or both?

I'm a bit surprised that a language pack that's not in UTF-8 would work correctly for certain accented letters but not for others. All accented letters should fail if the encodings don't match. Could it be that the forum is set up for Latin-1 and the Hungarian language pack is Latin-2? Even then, I would expect certain characters to display incorrectly, but not as ?.
Title: Re: Foreign characters don't show up
Post by: Grasshopper on May 29, 2012, 08:11:15 AM
Hello, I am the wife :-). Hubby does not speak English, so I am trying to understand the relay all this. I will ask him more details in the evening, but he also has already asked for help in the Hungarian forum or Simple Machines before (they could not solve it either).

First he installed the forum with non-UTF8 because it said to mark it only if you want to use several languages.
Otherwise he is using latin2_hungarian_ci in MySql and in all other databases it works fine.

After a few suggestions from the Hungarian Simple Machines forum, he installed the forum wtih UTF8 as well, in various ways.
The forum does display "ö" and "ü", only the long accents don't show up. Also, for example under your username where it says "Hero" in Hungarian it is "hős" - also, the "ő" does not show up.

Here is the website in question:
Title: Re: Foreign characters don't show up
Post by: emanuele on May 29, 2012, 08:36:54 AM
Could you post a link to a page where the problem is evident?

Thanks! :)
Title: Re: Foreign characters don't show up
Post by: MrPhil on May 29, 2012, 11:33:30 AM
If the language support files are Latin-2 (ISO-8859-2), the rest of the forum will have to be changed to Latin-2. Actually, you can probably leave the database as Latin-1, unless you don't like the sorting order it gives on certain accented characters. It can be changed through phpMyAdmin, but is a fairly long and detailed process to change each field one at a time from Latin-1 to Latin-2. SMF has a built-in conversion to UTF-8 which is very fast.

So, this leaves only the page encoding to deal with. First of all, see if Latin-2 will do the job. In your browser go to View > Character Encoding (or Character Set) and change it from Latin-1/ISO-8859-1 to Latin-2/ISO-8859-2. Does everything display correctly? If so, go into phpMyAdmin and go to the smf_settings table. See if there is a row with the "variable" global_character_set and "value" ISO-8859-1. If there isn't, don't worry -- use phpMyAdmin to add a new row of name global_character_set and value ISO-8859-2. If it does already exist, and was ISO-8859-1, change it to ISO-8859-2. If it was something else, don't change anything yet. Now your pages should display in Latin-2 and show the Long Vowels correctly. Please try it.

In the long run, if languages other than Hungarian are to be supported, you may be better changing to UTF-8, as that will support any language (alphabet) on Earth. You will have to change your language support packs to the -utf8 version.

P.S. There is a Hungarian language support board on this forum. Your husband may want to ask questions there.