Yesideez Posted November 12, 2008 Share Posted November 12, 2008 I'm creating a website in English and Polish. I've managed to enable the Polish character set in Windows so I can type them and my text editor (EditPlus) can use them also. Most are displaying but certain combinations are displaying strangely. I've tried: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <meta http-equiv="Content-Language" content="pl" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Not all at the same time but varying combinations. If you look at this register page I've listed the months in Polish but November (Październik) isn't displaying properly and the submit button should read "Posyłają Szczegóły" but I've got a strange "S" at the end of the first word. http://polska.pictureinthesky.net/register.php Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 12, 2008 Share Posted November 12, 2008 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Use utf-8 and make sure you save your source files in utf-8 WITHOUT BOM (Byte order mark). You can check your source file encoding in Notepad++) BTW: "Posyłają Szczegóły" is not proper Polish Quote Link to comment Share on other sites More sharing options...
BoltZ Posted November 12, 2008 Share Posted November 12, 2008 Do you study polish? Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 12, 2008 Share Posted November 12, 2008 I am Polish There are more funny translations on the site. I can help you with them if you wish. Quote Link to comment Share on other sites More sharing options...
BoltZ Posted November 12, 2008 Share Posted November 12, 2008 Oh I was like wow what doesn't this guy know Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 12, 2008 Share Posted November 12, 2008 Oh I was like wow what doesn't this guy know I could name a few subjects in which I am not proficient but not many... Just joking Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 Thanks Mchl, it's absolutely great knowing there's the help here if needed. I'm making the website for the Polish community here where I live and I've got a few Polish people ready to translate English into Polish. As for the improper Polish, I used poltran.com for some stuff so I'm aware some of it isn't what it should be but hopefully that'll all change as soon as they look at it later and translate some stuff for me. As for the "UTF-8 without BOM" I've just checked my editor and that option IS ticked - no idea why I'm getting strange characters where I've typed Polish words... Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 13, 2008 Share Posted November 13, 2008 Perhaps if you attached one file with source code containing polish chars, I could review it on my system to see if you're actually using proper characters. How did you configure your windows to type Polish characters? Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 Attached is the "register.php" script - there's no code yet as I've not written it yet. I've managed to get the Polish characters displaying properly if I use this: <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" /> Is that OK or is it a bad idea? [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 btw, I added the Polish characters into Windows using control panel>Regional and Language Options. I can switch between US, EN and PL using the blue icon next to my system tray. Edit+ is set to "Language: East Europe" (I did email the author of Edit+ asking how to support the Polish characters and that was what he said to use) Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 13, 2008 Share Posted November 13, 2008 Now for the trick question. What keys do you use to get following letters: Ą ł ź Ź Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 13, 2008 Share Posted November 13, 2008 Your file was ANSI encoded. I converted it to UTF-8. Check it now. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 Ą : "Alt Gr" + SHIFT + A ł : "Alt Gr" + L ź : "Alt Gr" + X Ź : "Alt Gr" + SHIFT + X (Alt Gr is my right-alt) Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 I changed the metatags file back to the UTF-8 setting, uploaded your version and it displays perfectly fine! It seems I just have to figure out how not to get Edit+ to save ANSI encoded :/ Thanks Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 Just checked Edit+ settings and nowhere is the option to enable/disable ANSI encoding :/ Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 Just found an option in the fonts settings... "Use font language for Unicode and IME conversion" Could that be anything? I have a feeling it's for encoding in the editor itself and not for saving files... Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 13, 2008 Share Posted November 13, 2008 Well then. Download Notepad++ and use its 'Convert to UTF-8 without BOM' option. That's what I did. I asked you about keys, because there are two layouts for Polish characters, one being derived from typing machines, and frankly I'm not sure if it would work well. Fortunately you seem to be using the proper one. Just found an option in the fonts settings... "Use font language for Unicode and IME conversion" Could that be anything? Dunno. Just try. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 I tried it and it messed all the characters up like it was the very first time I tried it. Do you think it is safe to use this instead of UTF-8? <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" /> With that it works fine... Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 13, 2008 Share Posted November 13, 2008 That's as safe as using <font> tags and IE specific CSS properties. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted November 13, 2008 Author Share Posted November 13, 2008 Oops lol I'll email the author of Edit+ again and ask them about the BOM option and see if he knows why it isn't working. If he can't supply a fix for it I'll have to install Notepad++ as well and use that for editing the site. Many thanks for all your help, it really is appreciated. I've never had to support foreign characters before and this certainly is a bit of an education! I've got to go to work now so I'll be signing off Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 13, 2008 Share Posted November 13, 2008 Well... with utf-8 it's actually easy. Before that I had to use iso-8859-2 encoding, and typing Polish characters was a hell. To get ą displayed, I had to put ± (alt+0177) into document. I still remember alt-codes for most common letters. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.