adam_snb — 2011-05-14T18:42:53-04:00 — #1
I'm having issues with displaying "š" and "č" characters in my html/css web page.
there is no problem with "á" "í" or "é".
I've tried many different windows pre-installed fonts, but they all display "s" instead of "š" and "c" instead of "č".
I also thought that the problem might be my English DOCTYPE tag, but can't find any Slovak one.
The page is supposed to be written in Slovak language, so i really need all these characters.
Big Thanks! for any help guys.
earlyout — 2011-05-14T19:08:24-04:00 — #2
Are you specifying the UTF-8 character set?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
spacephoenix — 2011-05-14T19:14:32-04:00 — #3
Try switching to a UTF8 doctype
adam_snb — 2011-05-15T19:48:27-04:00 — #4
Thanks for your advice, I've tried it but it didn't work.
It actually displayed some weird question mark instead of "á" "í" and so.
So I've checked some Slovak sites' <head>s to see how they do it,
and it either utf-8 or windows-1250 in the most cases.
Please if you have any thoughts what might be causing this problem,
share them with me.
earlyout — 2011-05-15T19:52:56-04:00 — #5
A link to your site would be a big help.
adam_snb — 2011-05-15T20:34:14-04:00 — #6
ok here is the link:
riant.sk | web riesenia | dizajn | sadn Vm
for example: 2nd menu item "web riesenia" is supposed to be "web riešenia"
ralphm — 2011-05-15T20:39:58-04:00 — #7
If you don't want to leave this to chance, you can use character references instead. Just place
&# before the number and
; after the number (with no gaps either side):
For š use 154
For č use 269
For á use 224
For í use 237
For é use 233
adam_snb — 2011-05-15T20:53:06-04:00 — #8
I just found out, that my notepad plus changes each š and č to s and c every time I restart it. I have English as default keyboard on my PC, so that's maybe making the mess.
What do you think?
adam_snb — 2011-05-15T20:57:04-04:00 — #9
yeah i know about those references, but it slows my writing down too much.
i can't imagine myself writing a number of pages like this.
but thanks anyway
stevie_d — 2011-05-16T07:38:06-04:00 — #10
You could always write the document as normal, with the accented characters, and then before you finally save it, just do a search-and-replace on each one with the relevant bit of code. Yes, it's still a bit of hassle, but at least it won't interrupt the flow of your writing.
earlyout — 2011-05-16T07:49:51-04:00 — #11
If you Google for notepad++ utf-8, you'll find a lot of discussions about problems getting Notepad++ to deal with UTF-8 characters properly, along with a collection of suggested solutions. (I don't use Notepad++, so I can't really test any of it.)
One proposed solution, that sounds promising:
Blog Rat: How to make UTF-8 as default encoding in Notepad++ manually
adam_snb — 2011-05-16T09:14:16-04:00 — #12
Thank you, EarlyOut!
The link you posted helped me to solve it in 2 minutes:)
riant.sk | web rie?enia | dizajn | sadnú Vám
earlyout — 2011-05-16T09:23:30-04:00 — #13
Good! I had a feeling that blogger was on the right track.
adh32 — 2011-05-16T11:08:11-04:00 — #14
I have never had any problems with getting NP++ to handle multi-byte characters, but I have always enforced the saving of documents as UTF-8.
Regarding search and replace: run it on all files in a directory and you will find that it is very quick and convenient, without even needing to open any files. It even auto-saves all modified files for you.