Planned at future Mantis releases, see phpBB's experience. Ultimate solution: convert physical Mantis database into utf-8. Latin-based scripts and CJK languages are probably unaffected Really a problem only for Cyrillic-based languages (length effectivelyĭoubles). If the database physically uses non-utf8 encoding, some long stringsĬould be truncated (e.g. The following minor problems could arise ( AFAIK, rather rare)ġ. * convert all the strings in the database from source_encoding to utf-8Īh, yes, we should have some utf-8 flag in the database not to convert * resize some fields subject to truncation (optional, see explanation below) Warning: some very long strings in the database could be truncated on In this case, youĬouldn't use new Multilanguage features of Mantis, but your installation Specify non-utf8 language as default in config_inc.php. Reasons not to perform conversion) You could skip conversion and just (If multiple encodings are uses in the Mantis, or you have other After setting up the new database with default character set utf8 you can import this sql script to create the new database schema.Ĭ. Mysql -uUser -pPassword bugtracker mantis-db.sqlĪnd you will get a dump file encoded in UTF-8. and imported the contents of the converted file into the new database: Iconv -f latin1 -t utf-8 backup_latin1.sql > backup_utf8.sql
After download and install iconv, then I created a new db:ĬREATE DATABASE `bugtracker` DEFAULT CHARACTER SET utf8 Or,Īlternatively, you could use convertion tools provided with you database (b). Manually, then convert this file to utf-8 using iconv (a), then re-create theĭatabase in utf-8 or 8859-1, then import the converted file. (For the expert users) If your database was previously set to anyĬustom encoding, you should export Mantis database to the text file Should simply run the conversion routine provided below.ī. Utf-8 or 8859-1 in your database server config files, AND your users do notĪctively use multiple encodings within single Mantis installation, you If you hadn't previously set up any custom default encoding except
To perform the conversion to still have them readable. If any non-Latin characters are used in your Mantis installation, you have Mantis 1.1.a2 and above now uses UTF-8 encoding by default.
Suggest using their utf-8 library as the base of string processing. If our strategy and licensing issues allow, I'd
Going farther (somewhat later), we could consider learning from phpBB team'sĮxperience and utf-8 code (phpBB 3, now in beta, will have one of most clean Need somebody to actually help with the implementation :) Not a php programmer (still I can read and understand php code), and thus we Why it hadn't been implemented yet? Being experienced in localization, I am
# DBSocket /path/to/mysql.AFAICR, the upgrade routine shown below will be sufficient. DBHost, DBPort, and DBSocket are advanced configuration options and typically only used in larger installations.
If using Japanese language, the PublishCharset config directive must be set to UTF-8, otherwise text may appear garbled.Ĭreate the user “mtuser” with the password “mtpasswd”: mysql> grant all on mt.* to identified by 'mtpasswd' Ĭonfigure the database in the mt-config.cgi file which is found in the MT application directory.Ī sample database configuration in mt-config.cgi using the sample values from Creating a MySQL database above. To specify “UTF-8” as the character set when creating a database named “mt”: mysql> create database mt character set utf8 UTF-8 is the default character code for published blogs. Warning: As of Movable Type 5, Japanese is only supported with UTF-8. To create a database named “mt”: mysql> create database mt The following steps require admin access to MySQL on the server. Instructions for using phpMyAdmin to setup a database.) (Your web host may have a GUI for database management.
These instructions are for creating a MySQL database via command line on the server. SQLite and Postgres are no longer supported in the core and will require a plugin for use. Database creation and configuration, using MySQL as an example.