Forum Moderators: mack

Message Too Old, No Replies

Special characters display

for some languages like danish

         

ruxique

9:38 am on Jan 29, 2004 (gmt 0)

10+ Year Member



How do I set the META tag in the html page to display special characters used in some languages?

It is the first time when I need to solve that problem.

If anyone can help, I thank in advance

Ruxique

tombola

9:50 am on Jan 29, 2004 (gmt 0)

10+ Year Member



Recently there was a tread about this in another forum:

[webmasterworld.com...]

ruxique

10:08 am on Jan 29, 2004 (gmt 0)

10+ Year Member



I read that topic, I tried to do what it is wrote there (the META setting) but still doesn't work.

To be more specific, I have a table in MySQL wich has to be displayed in HTML with PHP. In MySql the table looks fine, but in HTML it replaces all special characters with strange ones.

The language I have to use is danish.

So if somebody can help me, it would be great.

tombola

10:48 am on Jan 29, 2004 (gmt 0)

10+ Year Member



If you use Unicode (UTF-8), you MUST save your (html) documents as Unicode, otherwise it won't work.

ruxique

11:21 am on Jan 29, 2004 (gmt 0)

10+ Year Member



Sorry to stress you, but it doesn't work.
It just makes me crazy!

Have a look if you have time, to see for yourself.
[eehlis.com...]

Ruxique

tombola

12:51 pm on Jan 29, 2004 (gmt 0)

10+ Year Member



I went to that page and I'm for 99% sure that you did not save that page as a Unicode document.

Do this test: use a simple text editor like Wordpad and create a new (.html) file.
Copy and paste the lines below in that file and when you save this file, choose save as Unicode document.
Then view it in your browser.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
</head>
<body>

Replace this sentence with a sentence in Danish.

</body>
</html>

RonPK

4:26 pm on Jan 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ruxique, you could use the PHP command htmlentities(), which translates stuff like ø into the HTML equivalent (like &oslash;).

ruxique

4:39 pm on Jan 29, 2004 (gmt 0)

10+ Year Member



Thanks a lot to everybody, I make it work now.

Thanks for the time spent for me

Ruxique