Forum Moderators: phranque

Message Too Old, No Replies

Wrong charset for spanish characters?

Wrong charset for spanish characters?

         

marsol0001

2:10 am on Mar 19, 2008 (gmt 0)

10+ Year Member



Hi, I've got a page showing this: бйнуъСс
where it should show this:αινσϊΡρ

Is that an Apache setting which needs adjustment?
Help please!
Thanks a lot.

[edited by: jdMorgan at 2:18 am (utc) on Mar. 19, 2008]
[edit reason] No URLs, please. See Terms of service. [/edit]

marsol0001

4:41 am on Mar 19, 2008 (gmt 0)

10+ Year Member



Sorry jdMorgan, but I couldn't find other way to show the cyrillic characters I'm getting through the web server instead of the spanish accented vocals I expect.

coopster

4:05 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, marsol0001.

How does it look in your document on the server? Do you have a paragraph element with those exact html entities coded there?

marsol0001

10:01 pm on Mar 19, 2008 (gmt 0)

10+ Year Member



Thank you coopster,

Yes I've put the string between <p> tags in an html page. But before trying that, I've tried with a php page, because I thought it might be php causing the problem.

I don't know how to show you how it looks like: I can't include urls in this message, can't attach images. It's cyrillic characters.

In the server, when I do "cat index.html" it looks perfect, if that is what you meant. That's why I thought it might be the web server, but I don't know what part. Any ideas?

Thanks a lot.

jdMorgan

2:04 am on Mar 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Investigate Apache mod_mime [httpd.apache.org], the module which deals with character sets, languages, and encodings.

You may also find it helpful to download and install the "Live HTTP Headers" add-on for Firefox, which will give you a good look at the character set, language, and encoding response headers sent by your server to the browser. If any of these are incorrect, the characters on your site may be incorrect or garbled when rendered by the browser.

Jim

coopster

5:31 pm on Mar 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



when I do "cat index.html" it looks perfect, if that is what you meant.

Exactly what I meant. And from your first message ...

where it should show this:αινσϊΡρ

So you have something like this in your document ...

<p>αινσϊΡρ</p>

... and it is showing up as (Cyrillic characters pasted but html entity equivalents displayed here next) ...
<p>&#1073;&#1081;&#1085;&#1091;&#1098;&#1057;&#1089;</p>

The advice from jdMorgan duly noted, you will also want to have a look at any meta element you might be sending along too. Make sure you are using an appropriate charset attribute in an http-equiv meta:

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