Log in

View Full Version : Having problems with lenguage encoding...



auriaks
12-06-2009, 08:17 PM
Hi,
I use utf8-lithuania-ci encoding in my mySQL, because im lithuanian.
But then i met some difficulties, when my lithianian symbols become a code which is shown in my webpage non-converted to normal letters. What encoding I must use, because there is 3 types of lithuanian letter encode.
Thanks :)

bluewalrus
12-06-2009, 09:32 PM
You might have to use entities. http://tlt.its.psu.edu/suggestions/international/bylanguage/lithuanian.html#htmlcodes

djr33
12-06-2009, 09:32 PM
Using a specific encoding in mysql for Lithuanian is a bad idea, I think.
Try using an open encoding, like UTF8 (general).
There is no reason you can't use Lithuanian characters then, but it won't conflict with other types of characters either.

Also, if there is a problem, then something does not match. There are 4 possible problems (if not more):
1. The browser must enable the language (some systems don't have Japanese fonts, for example.)
2. The html must use the right encoding. You can use a meta tag to set this, and you should use Unicode if you have any non-English (and especially non-European) characters, because that is what Unicode is designed for.
3. The html TEXT file must be in the right encoding. In notepad or whatever program you use, be sure you have the encoding of the actual .htm file set to unicode (so it matches the encoding of the html in the document). Dreamweaver has caused problems with this for me so, and it will change the encoding and it looks like all the code is right but something still does not work. This is hard to notice, so it is good to know about and check to see if it is a problem.
4. The mysql database must match this as well. Use the same encoding.

Make sure all of the encodings match, and then it should work.


HTML entities will work very well, but it is very annoying to use them. If you only need a little content with strange characters, it is a good idea. But if you need your whole website in a language (Lithuanian), html entities will take a lot of time.