Part of website in utf8 and other part in Occidental ???

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
svergeylen
New Member
New Member
Posts: 6
Joined: Sat Dec 06, 2008 12:47 pm

Part of website in utf8 and other part in Occidental ???

Post by svergeylen »

Hello,

I've got a probmem with a new install of Cmsms 1.5, filled with old content.

I've got the display of the date in the news module which is in Occidental encoding, in place of Utf-8.

I can display correctly the "é" and "è" when I select Occidental but when I do that, all the rest is displyed with strange caracters ! :-o

My conclusion is that my website is correctly in utf-8 but the date is not. How can I resolve that ?

Thank you !

ps : see the printscreen in attach for more understanding...
Attachments
Capture2.png
Capture1.png
svergeylen
New Member
New Member
Posts: 6
Joined: Sat Dec 06, 2008 12:47 pm

Re: Part of website in utf8 and other part in Occidental ???

Post by svergeylen »

I've uninstall and re-install the news module but the problem is still there.... :-( Any idea ??? Thanks !
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Part of website in utf8 and other part in Occidental ???

Post by Dr.CSS »

New install with old content, how is that possible?...
svergeylen
New Member
New Member
Posts: 6
Joined: Sat Dec 06, 2008 12:47 pm

Re: Part of website in utf8 and other part in Occidental ???

Post by svergeylen »

I've inserted all the tables which have content of my old cmsms into the database of the new cmsms (1.5)

Perhaps is there a conflict in the encoding ? But I don't see the link between content in database and the fact that dates are display in Occidental.. :-( Any idea ?

Thanks !
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Part of website in utf8 and other part in Occidental ???

Post by Dr.CSS »

Sounds like a DB problem, when you moved the DB did it have the same settings in both?...
nhaack

Re: Part of website in utf8 and other part in Occidental ???

Post by nhaack »

Doesn't have to be a DB problem ... (though could well be)... an example:

I imported a UTF8 encoded table with 3rd party data into my CMS. I got encoding problems on the front-end as the script I used to access the DB was improperly encoded.

Here are some common sources of conflict I encountered with encoding:

1) Own scripts improperly encoding
2) Core files modified with editor not set th UTF8 (changed files were saved in wrong encoding)
3) On DB roll-back encoding for import was improperly set (mySQL was not explicitly set to utf8)
4) Encoding settings not stated in template
5) Wrong use of uf8_encode and utf8_decode in PHP

Probably these can help you to nail down the problem :)

What does your DB say? What encoding is it using?

I use the string "Iñtërnâtiônàližætiøn" to check for proper encoding. What happens with this string in regular content?

Best
Nils


edit:
however, the string mentioned above only covers Latin-1 range... if you want to check for double byte character-support, check this string "Ādam", the first character is U+0100 (or copy paste some Kanji from Google Japan).

not a real solution I know... but may be helpful for future testing.
Last edited by nhaack on Fri Jan 02, 2009 10:39 pm, edited 1 time in total.
Post Reply

Return to “Developers Discussion”