text encoding on the (new) blog

2 views
Skip to first unread message

BK Marcus

unread,
Mar 1, 2010, 7:51:27 AM3/1/10
to mise...@googlegroups.com
re http://web2.mises.org/blog/

Are these rare bits of strangeness going to have to be fixed by hand?

The Politics of Étienne de La Boétie

Or will a different setting change the above to "The Politics of Étienne de la Boétie" (with accented E at the beginning of Etienne and accented e in the middle of Boetie)?

--
B.K. Marcus
Managing Editor, Mises.org
Ludwig von Mises Institute

Peter Strömberg

unread,
Mar 1, 2010, 9:31:02 AM3/1/10
to mise...@googlegroups.com
Yes, I think this is what my MT-import attempts yesterday hinted at
me. Maybe the MT database is encoded differently from the WP one?
/PEZ

David Veksler

unread,
Mar 1, 2010, 10:23:02 AM3/1/10
to mise...@googlegroups.com
I am going to delete the database and start over with a different encoding to take care of this.
---
Regards,
David V.

PGP Key: http://www.rationalmind.net/david/DavidLeoVeksler.txt

alvarocoronel

unread,
Mar 2, 2010, 9:54:30 AM3/2/10
to Mises.org Development
This post is worth reading, there seems to be a plugin to solve this
problem.

http://alexking.org/blog/2008/03/06/mysql-latin1-utf8-conversion

And yes, the databases are created with different encodings.

Tables in MT are created with charset latin1, as in
CREATE TABLE `mt_asset` (
.
.
.
) ENGINE=MyISAM AUTO_INCREMENT=123 DEFAULT CHARSET=latin1;

whereas in wp4 they are created with charset UTF8

CREATE TABLE `wp_commentmeta` (
.
.
.
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

alvarocoronel

unread,
Mar 2, 2010, 1:11:47 PM3/2/10
to Mises.org Development
Well, found another post that details exactly how to transform a
latin1 encoded database to utf8

it is in spanish, here http://www.guatewireless.org/tecnologia/bases-de-datos/convertir-de-latin1-a-utf-8-en-mysql/

The steps are:

Export the database in latin1 to a file using the mysqldump command

:~$ mysqldump -u <user> -p <database> –default-
character-set=latin1 > backuplatin1.sql


(this will prompt for a password)

Using whatever admin tool you use, create a new database with UTF8
encoding

:~$ mysql -u mi_usuario -p
mysql> CREATE DATABASE nueva_db CHARACTER SET utf8 COLLATE
utf8_general_ci;

(I don't know what utf8_general_ci is exactly...)

Now convert the charset of the file backuplatin1.sql. In the resulting
file, change all references to charset latin1:

:~$ iconv -f ISO-8859-1 -t UTF-8 backup.sql > backup_utf8.sql
:~$ perl -pi -w -e 's/CHARSET=latin1/CHARSET=utf8/g;' backup_utf8.sql

(this can be done with different tools depending on your environment,
see more about this here: http://docs.moodle.org/en/Converting_files_to_UTF-8)

Now use the dumpfile converted to utf8 importing it into the new
database just created
:~$ mysql -u mi_user -p nueva_db –default-
character-set=utf8 < backup_utf8.sql

By following this procedure, we would have a copy of the original MT
database but now using latin1 instead of UTF8.

We still would have to migrate it to WP4

jcfo...@pureperfect.com

unread,
Mar 3, 2010, 9:21:54 AM3/3/10
to mise...@googlegroups.com

(I don't know what utf8_general_ci is exactly...)

It's a sorting comparator. The "CI" stands for case insensitive.

alvarocoronel

unread,
Mar 3, 2010, 6:32:40 PM3/3/10
to Mises.org Development
Well.. that's "pureperfect", thanks a lot jcfol, I see how I can use
this!

Reply all
Reply to author
Forward
0 new messages