Hallo!
Today someone added a comment to an entry in my blog. This comment contained an "ε" (Epsilon). Within the email which was sent for moderation everything was OK. But within the comment showed on my blog this character was replaced by a "?" (see original). But don't confuse this with the character showed when the character encodings are not correct!
To solve this problem I tried to replace this question mark manually with the correct character, but without success.
Does anyone have an idea why this doesn't work or if this could really be a bug?
Regards,
Pascal
Problem with special characters in comments [SOLVED]
Problem with special characters in comments [SOLVED]
Last edited by WebComPas on Tue Apr 26, 2011 11:39 pm, edited 1 time in total.
Interessantes aus den Themenbereichen Computer, Internet und Programmierung unter http://www.it-blog.net
Re: Problem with special characters in comments
Hi
The symbol needs to be from the same character set as your page and database is set for.
As your page is set to UTF-8, you need to check the database settings to be in UTF-8 format too.
Are you using the most recent MySQL version? This one should have charset support. Changes will only effect new entries.
ε is part of unicode ε ε ε
Pardon?But don't confuse this with the character showed when the character encodings are not correct!
The symbol needs to be from the same character set as your page and database is set for.
As your page is set to UTF-8, you need to check the database settings to be in UTF-8 format too.
Are you using the most recent MySQL version? This one should have charset support. Changes will only effect new entries.
ε is part of unicode ε ε ε
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Problem with special characters in comments
I know, that all the encodings have to be set correctly. But this can't be the problem, because other special characters (for example the German umlauts) work without problems.
Checking the hex dump of this page also confirmed that the HTML code really contains a question mark (0x3F UTF-8).
So there must be another reason for this strange behaviour.
Checking the hex dump of this page also confirmed that the HTML code really contains a question mark (0x3F UTF-8).
So there must be another reason for this strange behaviour.
Interessantes aus den Themenbereichen Computer, Internet und Programmierung unter http://www.it-blog.net
Re: Problem with special characters in comments
Since the email was send by GET/POST data and the show comment is build by database data, this is the only way I can think of. Did you check the correct table for comments?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Problem with special characters in comments
Up to now I always tried to edit the comment using the comment edit form within the admin area. Now I tried to execute the corresponding UPDATE query:
This resulted in the following error message:
Code: Select all
UPDATE blog_comments SET body='ebenfalls danke - ε/2' WHERE id=209;
So I checked my database for the specified collations. Most tables had utf8_general_ci but some (including the comments table) had latin1_swedish_ci. After I had changed this the problem concerning the Epsilon didn't occur anymore.Warning: #1366 Incorrect string value: '\xCE\xB5/2' for column 'body' at row 1
Interessantes aus den Themenbereichen Computer, Internet und Programmierung unter http://www.it-blog.net
Re: Problem with special characters in comments
Well done.
That is the sort of solution my answers were heading to.
latin_swedish has a build in umlaut support, as far as I remember.
That is the sort of solution my answers were heading to.
latin_swedish has a build in umlaut support, as far as I remember.
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian