Jump to content

Polish characters don't display properly


Yesideez

Recommended Posts

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

Link to post
Share on other sites

<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

Link to post
Share on other sites

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...

Link to post
Share on other sites

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?

 

Link to post
Share on other sites

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]

Link to post
Share on other sites

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)

Link to post
Share on other sites

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 :D

Link to post
Share on other sites

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...

Link to post
Share on other sites

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.

Link to post
Share on other sites

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...

Link to post
Share on other sites

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 :(

Link to post
Share on other sites

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.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.