Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-03-02 13:07:06
- manamex
- New Member
- Registered: 2005-05-30
- Posts: 7
support for iso-8859-2 and central european languages
Hello Everyone,
I’m straggling with textpattern and iso-8859-2 coding format.
From what I’ve learned text pattern is using utf-8 as standard encoding format. My MySQL database is configured to use is as well.
I do however specify iso-8859-2 coding format in the header:
<meta http-equiv=“content-type” content=“text/html; charset=iso-8859-2” />
because I would like to use ‘special’ characters of Polish alphabet.
I thought it works fine (they are displayed correctly in all browsers I have tested) till I discovered that some of searches (including google) have trouble indexing my site and are not able to display the characters correctly.
Any ideas what is going wrong?
Thanks
Offline
#2 2006-03-02 15:13:02
- alice_c
- Plugin Author
- From: Karlsruhe, Germany
- Registered: 2004-07-03
- Posts: 33
Re: support for iso-8859-2 and central european languages
“I do however specify iso-8859-2 coding format in the header:”
In your html? This is useless, as txp sends php-headers from inside. You have to hack this, otherwise it won’t work.
Offline
#3 2006-03-02 15:43:45
- manamex
- New Member
- Registered: 2005-05-30
- Posts: 7
Re: support for iso-8859-2 and central european languages
Thanks for comment!
I’m not sure what to do to make it work. My database works in utf-8 mode and textpattern also works in this mode.
I can hack it and try to change both database and textpattern to ISO.
Doe’s it work? Have anyone manage to make it work?
What files have to be changed? Should I also change settings for the database?
Regards,
Last edited by manamex (2006-03-02 16:02:41)
Offline
Re: support for iso-8859-2 and central european languages
Hi manamex
If you use UTF-8 both in TXP and in the database, then you dont have to specify “iso-8859-2” in your header.
You should put “utf-8” in the head:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Also, check in config.php that the line about the database encoding is “utf8” too.
$txpcfg['dbcharset'] = 'utf8';
This way, everything (TXP, database, and your site header) is in UTF-8
AFAIK, you dont have to choose ISO-8859-2 to use and display special characters of Polish alphabet.
UTF-8 should be enough.
So, Google shouldnt have any problem indexing your site with the right characters if everything is in UTF-8 (I used to have the same problem long time ago).
But, please, anyone correct me if I’m wrong.
BTW: searching I have found this:
http://forum.textpattern.com/viewtopic.php?id=14684
http://textpattern.net/wiki/index.php?title=Unicode_Support#Diagnostics
Offline
Re: support for iso-8859-2 and central european languages
> Also, check in config.php that the line about the database encoding is “utf8” too.
> $txpcfg[‘dbcharset’] = ‘utf8’;
Nobody touch that. It’s a techincal detail, that nobody should be changing unless he understands what it does and what the consequences are. It can screw up things. Textpattern determines this on install, and usually it never has to be changed, unless there is some mysql-downgrade and the db-content is cnverted as well etc.
That line has nothing to do with the charset that Textpattern uses for the pages, or the headers or anything else. It only affects how Textpattern handles the db-connection.
> AFAIK, you dont have to choose ISO-8859-2 to use and display special characters of Polish alphabet.
> UTF-8 should be enough.
Absolutely correct. No point in trying to use another charset. Remove everything that relates to that. That may be the reason why search-engines are confused and display characters wrongly. UTF-8 can handle tens of thousands of different characters, there is no need to go back to archaic legacy encodings.
Offline
#6 2006-03-02 19:37:41
- manamex
- New Member
- Registered: 2005-05-30
- Posts: 7
Re: support for iso-8859-2 and central european languages
OK, I’m simply going to follow your advice and put utf-8 coding in all my html headers.
Hope it will solve my prolem.
Thanks!!!
manamex
Offline
Re: support for iso-8859-2 and central european languages
> Sencer wrote:
> > Also, check in config.php that the line about the database encoding is “utf8” too.
> $txpcfg[‘dbcharset’] = ‘utf8’;
> Nobody touch that. It’s a techincal detail, that nobody should be changing unless he understands what it does and what the consequences are. It can screw up things. Textpattern determines this on install, and usually it never has to be changed, unless there is some mysql-downgrade and the db-content is cnverted as well etc.
> That line has nothing to do with the charset that Textpattern uses for the pages, or the headers or anything else. It only affects how Textpattern handles the db-connection.
Hi Sencer!
When my hosting upgraded from MySQL 4.0 to MySQL 4.1, I did all the things needed to convert my database from latin1/iso-8859-1 to a utf-8.
I change the database, encoding, and my site headers two.
Then, I went to my frontpage and I started to cry because some characters were been showed as “?” or weird symbols.
So, I wrote to Kusor, still crying, and he told me: Did you change the line about the “dbcharset” in the config.php?
So I changed that line in my config.php from “latin1” to “utf8” and everything started to work fine again.
:D
OK, when I installed TXP for the first time, TXP determined that the connection with the database had to be handled as latin1.
But after upgraded MySQL and after I do everything to convert my DB to UTF-8, I needed to change that line.
So i touched it! :P
Offline