[otrs] Convert iso-8859-1 to utf-8

371 views
Skip to first unread message

Guillaume Rehm

unread,
Mar 10, 2010, 4:12:38 AM3/10/10
to User questions and discussions about OTRS.org
Hi list,

I have an OTRS 2.4.7 in
iso-8859-1 charset mode and I would put it in utf-8.

My sql database should be in utf-8 mode.

mysql> SHOW VARIABLES LIKE "character_set_%" ;

+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.10 sec)

All rows must be in utf-8 ?

In Otrs, when I change
$Self->{DefaultCharset} to 'utf-8', Otrs works but the Sysconfig link doesn't work.

Do you have a procedure ?
I found that http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ&ItemID=52

I must have to convert all data ? (by mysqldump ? )

Thanks in advance.

Best Regards,
-- 
Guillaume REHM
Centre de Ressources Informatiques
Responsable Sécurité du Système d'Information (RSSI)

Bibliothèque Nationale et Universitaire de Strasbourg
5 rue du Maréchal Joffre
BP 51029
67070 Strasbourg

tél: 03 88 25 28 23
fax: 03 88 25 28 03
mail: guillau...@bnu.fr
web: http://www.bnu.fr

André Bauer

unread,
Mar 10, 2010, 7:05:50 AM3/10/10
to User questions and discussions about OTRS.
Guten Tag Guillaume Rehm,

Try this:

1) Export the data:
mysqldump -uUser -pPassword --default-character-set=utf8 otrs > otrs.sql

2) In otrs.sql:

SET NAMES latin1 -> change to -> SET NAMES utf8
and all
DEFAULT CHARSET=latin1 -> change to -> DEFAULT CHARSET=utf8

3.) Import the data:

mysql -uUser -pPassword otrs_new < otrs.sql

am Mittwoch, 10. März 2010 um 10:12 schrieben Sie:

GR> Hi list,

GR> I have an OTRS 2.4.7 in iso-8859-1 charset mode and I would put it in utf-8.

GR> My sql database should be in utf-8 mode.

mysql>> SHOW VARIABLES LIKE "character_set_%" ;

GR> +--------------------------+----------------------------+
GR> | Variable_name | Value |
GR> +--------------------------+----------------------------+
GR> | character_set_client | latin1 |
GR> | character_set_connection | latin1 |
GR> | character_set_database | utf8 |
GR> | character_set_filesystem | binary |
GR> | character_set_results | latin1 |
GR> | character_set_server | latin1 |
GR> | character_set_system | utf8 |
GR> | character_sets_dir | /usr/share/mysql/charsets/ |
GR> +--------------------------+----------------------------+
GR> 8 rows in set (0.10 sec)

GR> All rows must be in utf-8 ?

GR> In Otrs, when I change $Self->{DefaultCharset} to 'utf-8', Otrs works
GR> but the Sysconfig link doesn't work.

GR> Do you have a procedure ?
GR> I found that
GR> http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ&ItemID=52

GR> I must have to convert all data ? (by mysqldump ? )

GR> Thanks in advance.

GR> Best Regards,

--
Mit freundlichen Grüßen
André Bauer
mon...@gmx.net

System:
Ubuntu 8.04.1/Apache 2.2.8-MOD_PERL/MySQL 5.0.51a/ OTRS 2.3.3

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Ivan De Masi

unread,
Mar 10, 2010, 8:02:41 AM3/10/10
to User questions and discussions about OTRS., Guillaume Rehm

Hello Guillaume,

here's also a good howto if your going to convert your database or
single tables:

http://en.gentoo-wiki.com/wiki/Convert_latin1_to_UTF-8_in_MySQL

Good luck!

Regards,
Ivan

André Bauer

unread,
Mar 12, 2010, 10:45:04 AM3/12/10
to User questions and discussions about OTRS.
Guten Tag Ivan De Masi,

am Mittwoch, 10. März 2010 um 14:02 schrieben Sie:

IDM> here's also a good howto if your going to convert your database or
IDM> single tables:

IDM> http://en.gentoo-wiki.com/wiki/Convert_latin1_to_UTF-8_in_MySQL


I had problems when using iconv because it crashs if files are bigger
than 2 GB.

Maybe you can also use this script:

/opt/otrs/scripts/tools/convert_db_to_utf8.pl


--
Mit freundlichen Grüßen
André Bauer
mon...@gmx.net

System:
Ubuntu 8.04.1/Apache 2.2.8-MOD_PERL/MySQL 5.0.51a/ OTRS 2.3.3

---------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages