Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.8k views
in Q2A Core by
edited by

There is kind of a problem with foreign special characters.

On the page it works fine, one can use á, é ñ and all kind of characters.

But when doing a google search the results show up like:

Música --> MÚsica

Educación --> EducaciÃģn

and so on.

Is there a work around ? I did not notice that kind of problem in 1.4 and the other question a user posted today regarding special characters in urls makes me think that it could be a bug.

EDIT1:

The server header sends out utf 8:

 

Content-Type: text/html; charset=utf-8

Should I add a charset for spanish to the script ?

 

Q2A version: 1.5
by
Can you please post a link to the page on your site, and the Google search you're doing that shows it up wrong?
by
edited by
All language files have been utf 8 encoded (without bom) editor npp,

Only the advanced theme file was in ascii now i made it utf 8 as well.

Link: www.mipregunta.mx

Google search: "mipregunta.mx" or for one example "mipregunta.mx mas recomendada para hacer blogs".

In that example there is as well the beginning >>  ¿  << the >> á << character in chinese now.

The characters in the language files I could change to the &aacute; form, but the user submitted questions, there I have no way to control output.

( The categories may have been sometimes wrong because I had them in the theme file which was not utf 8 encoded. However, on the website I never saw an error only in google search )

2 Answers

0 votes
by
OK, I can see the problem, but I can't be sure why it happened.

The Google preview on the search results is now correct, so I would say the most likely explanation is that you server was sending out the wrong character encoding in the HTTP headers for a while, and this is when Google indexed the page.

If you set your web browser to view that page in Simplified Chinese (GB 2312) encoding, you'll get the same symbols that are showing up in the Google search results.
by
So I will wait a time and see what happens. As long as nobody else reports this, it must be a server issue. Thanks so far..
by
I've same problem with IE. In the url ending of categories' links, the special characters á, é, ü, etc, doesn't show up correctly. This is the problem with XML Sitemap page also.

With Firefox, the url-s looks right, but xml page contains strange characters instead of accented characters.
0 votes
by

I am not that great a scripter and still building my site, its italian and utf-8 will not do so I changed it to ISO-8859-1...

in qa-page.php on line 442 the content-type gets declared and that got rid of all the ? in the texts, I still have to upload it to the web-server... but chances are that takes care of it, maybe you just find the correct charset and put it there...

Q2A must send some kind of header beyond the one in the html, I first changed it in qa-theme-base.php just hard coding it instead of the variable, but that made no difference although the source html showed the correct charset...

good luck, gerry

ps: next I'll have to figure out to have users select their language, and a selection option between various languages for the messages, you have any clue to that ?

 

by
I'm sorry for some wrong information...
if you change qa-page.php on line 442, the q2a site will indeed misplace quite some special chars... in my template I have quite a bit of text 'around' the q2a windows, and that displays fine...
by
my final solution, in the rest of my site I work with utf-8 too now, I thought it wouldn't take all the latin chars, but it does, I had to take care that all my files where saved in utf-8, but all looks fine now
...