Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-13 10:58:37

stef25
Member
Registered: 2005-12-26
Posts: 88

Character encoding issue

i backed up the database from server 1 to server 2 for testing. All the articles now show question marks instead of apostrophes, for example: the dog?s ear. below are the diagnostics from both servers. the only issue i can see is that with server 2 everything is “latin1” but the character_set_system = utf-8. Is this a setting i need to change on my shared hosting account?

diagnostics server 1:

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
18 Tables: OK

diagnostics server 2:

Charset (default/config): latin1/latin1
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /data/mysql/karren/share/mysql/charsets/
18 Tables: OK


I need someone to protect me from all the measures they take in order to protect me

Offline

#2 2007-01-13 11:03:27

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Character encoding issue

The settings are all ok, but you probably imported it wrong. When importing your dump, you have to make sure it’s interpreted as latin1 as well (there’s options for more recent versions o phpmyadmin and for the commandline-tool). Alternatively: Have you edited and resaved the dump in any editor?

Offline

#3 2007-01-13 11:57:20

stef25
Member
Registered: 2005-12-26
Posts: 88

Re: Character encoding issue

thanks! i havent edited or resaved the dump, no. when i move the db back to server1 (live) what should i look out for? this issue doesnt matter on the testing server as long as it gets fixed when moving back to live


I need someone to protect me from all the measures they take in order to protect me

Offline

#4 2007-01-13 14:57:21

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Character encoding issue

what should i look out for?

When importing your dump, you have to make sure it’s interpreted as latin1 as well (there’s options for more recent versions o phpmyadmin and for the commandline-tool)

I doubt things will magically correct themselves, when you make the same mistake twice.

On the command line you can usually specify: --default-character-set=latin1. In phpmyadmin there should likewise be a similar option where you import the sql file.

Oh, it’s also possible that there error is not in the db, but results from specifying the wrong character-set in the html-meta tags (or if you use php or plugins to send a charset-value). On that end (i.e. html/browser) you always work with utf8. (The above latin1 references are only internal to how mysql handles text).

Last edited by Sencer (2007-01-13 15:01:09)

Offline

Board footer

Powered by FluxBB