Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Getting öäå characters to show up properly
Hello there,
I have looked at the forums here, read the TextBook, and even consulted MySQL’s site but I am not finding an explanation on how to do Swedish localisation. I normally use html entities for this which tends to work well i.e. å looks like å.
Do I have to change the database or the web pages?
I am running MySQL with character_set assigned latin1 and index.php has this in its headers;
What must be done to render äöå on the page?
Thanks for any feedback
Offline
#2 2005-10-04 23:09:19
- rene
- Member
- From: Switzerland
- Registered: 2004-03-27
- Posts: 67
Re: Getting öäå characters to show up properly
Hi – are you using utf-8 as character encoding for your pages?
Offline
#3 2005-10-05 00:16:56
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Getting öäå characters to show up properly
What must be done to render äöå on the page?
Normally: nothing. Regardless of your locale setting, just write utf-8 directly in your article body (no need to use entities). As long as your page template has the correct doctype, everything should Just Work.
Some brief pointers in the FAQ.
Alex
Offline
Re: Getting öäå characters to show up properly
Thanks for the replies, it is a sign of a healthy forum!
I have a DOCTYPE which looks like this –
!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”
html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”
meta http-equiv=“content-type” content=“text/html; charset=utf-8”
You can see from the last line that I have the charset to utf-8 and the DOCTYPE exists.
What elese needs to be done to render the text correctly? (The faq helped somewhat but lacked a concrete example.)
Jeremiah
Last edited by miahfost (2005-10-05 10:23:37)
Offline
#5 2005-10-05 11:51:18
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Getting öäå characters to show up properly
Can you post a link to a page that shows the problem? Your diagnostics would probably help also.
Alex
Offline
Re: Getting öäå characters to show up properly
Sure;
Link – http://sselkc.us/current/textpattern/index.php
Diagnositcs (in Swedish and English)
Swedish first:
Textpattern-version: 1.0rc5 (r705)
last_update: 2005-10-03 12:05:41/2005-08-01 09:52:54
Dokument-rot: /var/www/www.riksettanslarmcentral.se
$path_to_site: /var/www/www.riksettanslarmcentral.se
Textpattern-sökväg: /var/www/www.riksettanslarmcentral.se/textpattern
Permanentlänk-läge: section_id_title
Tillfällig mapp: /tmp
Sajt-URL: www.riksettanslarmcentral.se
PHP-version: 4.3.10-16
Magic quotes: 1/0
MySQL: 4.0.24_Debian-10sarge1-log
Locale: en_GB.UTF-8
Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.8.22 OpenSSL/0.9.7e
Apache-version: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.8.22 OpenSSL/0.9.7e
English
Textpattern version: 1.0rc5 (r705)
last_update: 2005-10-03 12:05:41/2005-08-01 09:52:54
Document root: /var/www/www.riksettanslarmcentral.se
$path_to_site: /var/www/www.riksettanslarmcentral.se
Textpattern path: /var/www/www.riksettanslarmcentral.se/textpattern
Permanent link mode: section_id_title
Temp folder: /tmp
Site URL: www.riksettanslarmcentral.se
PHP version: 4.3.10-16
Magic quotes: 1/0
MySQL: 4.0.24_Debian-10sarge1-log
Locale: en_GB.UTF-8
Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.8.22 OpenSSL/0.9.7e
Apache version: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.8.22 OpenSSL/0.9.7e
Pre-flight check:
————————————
/var/www/www.riksettanslarmcentral.se/index.php is inaccessible
File Upload Path is not writable: /var/www/www.riksettanslarmcentral.se/files
.htaccess file is missing
————————————
Charset (default/config): latin1/latin1
character_set: latin1
character_sets: latin1 big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1_de latin2 latin5 sjis swe7 tis620 ujis usa7 win1250 win1251ukr win1251
19 Tables: OK
I see a conflict between the default MySQL Charset (latin1) and the TXP locale (en_GB.UTF-8) is this the source of the problem?
Jeremiah
Last edited by miahfost (2005-10-05 13:58:55)
Offline
Re: Getting öäå characters to show up properly
No that is not really a conflict. mysql4.0 does not support utf8-databases. However that is not really a problem, since you can still get your data in and out without a problem.
You’re problem is unrelated and due to the fact that youa re using:
- 1.0rc5 (r705)
Please update to 4.0.1 as soon as possible and keep track of new releases on the weblog. 1.0rc5 does not set an explicit http-header on the backend, and therefore some PHP/Apache configurations override it with a forced iso8599 header, which leads to the problems you described. Updating textpattern should solve the problem.
Offline
Re: Getting öäå characters to show up properly
Thank you very much Sence, I downloaded the latest version and all is well. I have no idea where I got that old version from, though I have been following development for a while.
Thanks to everyone who responded.
Regards,
Jeremiah
Offline