Is there a documented fix for the character encoding problems that result from the differing encodings between pmachine db structure and EE structures?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
June 03, 2008 11:24am
Subscribe [2]#1 / Jun 03, 2008 11:24am
Is there a documented fix for the character encoding problems that result from the differing encodings between pmachine db structure and EE structures?
#2 / Jun 03, 2008 12:04pm
Not that I know of- it’s more of a db issue. Did you keep the encodings consistent? latin->latin? If so- can you link to an example page where it’s borking?
#3 / Jun 03, 2008 9:58pm
I just followed the step by step in the CP Home › Admin › pMachine Pro Import Utility. I *know* it’s a problem with latin->utf8.
Quite a few � on this page:
#4 / Jun 04, 2008 10:45am
Yep- you can’t just change the encode setting- that doesn’t actually convert the existing data. If it was latin- need to keep it latin. Or- actuall convert the file. Which isn’t necessarily easy. I think Ingmar linked to a script before that did it.
BUT- can you just keep it latin? When I force the browser to use latin/wester, page seems to render fine. Try it in your browser. So basically- keep it latin, switch the header, which is now:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>If you’re using the global to output that, then switching it in the cp will automatically switch it in the header. And add new entries in latin- assuming you haven’t changed the db settings.
But to go latin-utf? You actually have to convert the data. Looks to me like the old data are still latin.
That make any sense? This stuff is tricky.
#5 / Jun 04, 2008 11:06am
Robin’s spot on, of course. I suspect your data was Latin-1 (nothing wrong with that), and now your website uses utf-8. That works only for characters where it’s never an issue anyway, ie 7-bit ASCII. So, to reiterate what she said: try changing utf-8 to latin-1 in your control panel—or take the plunge, convert your database and re-upload again. Your call 😊
#6 / Jun 05, 2008 12:44am
I didn’t have time to test this evening, but are you saying that I shouldn’t bother with the script you posted previously?
#7 / Jun 05, 2008 10:26am
I think it boils down to what you want to do. Do you want/need to move to utf-8? If so, then you’ll need to convert from the latin->utf-8, then import.
If you don’t need/want to? Then just leaving it latin should solve the issue.
Not really a right/wrong per se. Leaving it be in latin is the easy option. But it’s not the only option.
Make sense?
#8 / Jun 16, 2008 3:39pm
Finally attempting this now-
I’ve get EE set to ISO 8859-1 encoding and I’m importing from the pMachine database with a Latin-1 encoding. But as you said, it is really all in the display settings.
<meta http-equiv=“Content-Type” content=“text/html; charset=charset=ISO-8859-1”/>
instead of
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”/>
Seems to do the trick.
#9 / Jun 16, 2008 4:02pm
Glad to hear it. Does that mean you’re all set?
#10 / Jun 16, 2008 5:06pm
I guess.. until I need to use extended characters 😊
#11 / Jun 16, 2008 5:10pm
OK, I’m closing that one out then, for now. Unless you need, say, Chinese or Russian characters, using either Latin-1 or Unicode should be fine. If anything comes up, just start a new thread. Thanks.