OpenCraft
Follow OC!
  • Home
  • About
  • Solutions
  • Portfolio
  • Clients
  • Blog
  • Contact

Mantis now supports Arabic

Thu, 2007-02-15 14:07
Tags:
  • coding
  • Mantis
By: 
Karim Ratib

To let Mantis 1.0.x accept Arabic input, we did the following:

  • First convert the existing database to UTF-8. You need to make sure that my.cnf contains the following:

[mysqld]
max_allowed_packets=16M
init-connect='SET NAMES utf8'
 
[mysql.server]
default-character-set=utf8

  • Export the current database:

$ mysqldump -u root -p --opt --allow-keywords --hex-blob --max_allowed_packet=16M --quote-names mantis > mantis.sql

  • Convert the contents to UTF-8:

$ iconv -f latin1 -t UTF-8 mantis.sql > mantis-utf8.sql

  • Convert the schema to UTF-8:

$ sed s/latin1/utf8/g mantis-utf8.sql > mantis-utf8-utf8.sql

  • Put back the database:
    $ mysqladmin -u root -p drop mantis
    $ mysqladmin -u root -p create mantis
    $ mysql -u root -p mantis < mantis-utf8-utf8.sql

  • Now Modify Mantis. Edit mantis/lang/strings_english.txt and modify:
    $s_charset = "windows-1252";
    to be
    $s_charset = "UTF-8";

Happy coding!

  • kratib's blog

Our work

CMIC Wireframe
CMIC BookWeb

CMIC approached OpenCraft to design the user experience for one...

HCSI IBD

HC Securities and Investment's growth had spurred the need for a...

View our complete portfolio

Related posts

  • The Automatic Resource Destructor pattern
  • Beware PHP $_REQUEST!
  • Run webinject (nagios plugin) for drupal projects
  • Coloring 1pixelout flash player in audio module
  • Apache MultiViews automatically appends file extensions

More posts by this author

  • Reverse-translating a string back into English in Drupal
  • Who needs Google Spreadsheets: Use Sheetnode!
  • Code contribution: Views Bulk Operations (VBO)
  • The Automatic Resource Destructor pattern
  • Where in the world is open source?

OpenCraft

  • About
  • Team
  • Process
  • Community
  • Media Kit
  • Portfolio
  • Clients
  • Industries
    • Social economic development
    • Multimedia culture
  • Services
    • Drupal development
    • Information architecture
    • Open source software development
    • Social network engineering
  • Request quote
  • Contact
  • Search
Blog

Our profiles at:

Drupal Google
rss

Creative Commons License
search