Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Should I rewrite my textpattern in utf8 or keep latin1
Hello. I created a site locally that is still in progress. When I originally created the database it was in latin1. I don’t have too many articles written, just mostly forms and pages.
Should I recreate my database in utf8 to ensure future compatability.
What are your thoughts?
Art Rogue – Fine Art Photography
Offline
Re: Should I rewrite my textpattern in utf8 or keep latin1
It certainly can’t hurt, as UTF-8 is preferred. See <a href=“http://textpattern.com/faq/40/non-ascii-characters-are-missing-or-incorrect”>this FAQ</a> for more information.
That said—whether it’s <strong>required</strong> is something I can’t comment on. Maybe someone more knowledgeable about MySQL can comment.
Offline
#3 2005-12-24 06:39:39
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Should I rewrite my textpattern in utf8 or keep latin1
You don’t have to re-create it. You can change your collation via phpMyAdmin, it’s under “Operations” (as one possibility).
Offline
Re: Should I rewrite my textpattern in utf8 or keep latin1
Hey Mary! Is it really that simple, or am I taking a gamble? Has anyone tried it?
Art Rogue – Fine Art Photography
Offline
#5 2005-12-24 07:38:01
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Should I rewrite my textpattern in utf8 or keep latin1
Well, do a backup first and try it out. runs and hides, hands over ears…
I’ve done it before, though not with Textpattern, and didn’t seem to have any problems. If it doesn’t work you can still go back to your backup.
Offline
Re: Should I rewrite my textpattern in utf8 or keep latin1
The collation is something different than the charset.
If you know you are always going to be using mysql4.1 and newer, than using a utf8-database is indeed the better way to go. Converting usually requires exporting and re-importing and then manipulating the backed up file.
If it’s really only a few articles, you may find it easier to just start from scratch.
Offline
#7 2005-12-24 11:38:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Should I rewrite my textpattern in utf8 or keep latin1
Muagh (one of the versions of unintelligible noises I vocalize, equivalent to “duh”). Indeed, I did not know the difference, and just assumed they were linked in some way, but having no clue as to what they really worked. They are related, sort of, just not quite how I was thinking they were.
Is latin1 vaguely like how iso-8859-1 is a sub-set of utf-8, so just switching would be okay, or no?
Last edited by Mary (2005-12-24 11:39:44)
Offline
Re: Should I rewrite my textpattern in utf8 or keep latin1
latin1=iso-8859-1.
Some characters are represented (in bytes) the same way with utf-8 as they are in iso-8859-1, but others aren’t. But that’s not really the issue here anyway. We are already storing utf-8 strings, even when dealing with latin1-databases.
As for converting/switching etc. etc., we are very interested in getting feedback from people who have successfully done that. (With a detailed description of the environment, before, after and the steps that were done). Mamash posted some stuff that worked for him on textdrive in another thread.
Offline