TurnKey Linux Virtual Appliance Library

Unicode characters turns into "?" by redmine

I run a redmine ve I download today (4-dec-2009).

When I enter russian text into wiki, it displays as "?????" on screen, but can be downloaded as html or text file correct. But when I choose to edit tha text, it converts into "???" in edit field.

Can I use redmine with russian or other non-ascii chars, and how can I tune it?

 

Liraz Siri's picture

Try to convert Redmine to use UTF8 for its character set

I'm not much of Redmine expert myself but I'm guessing you may an issue with character sets. Try to see if converting the databases to UTF8 solves your issues. I've filed a bug report about supporting UTF8 by default.

Workaround solution

Hello! I had found a simple workaround. After appliance installation enter command line (http://1.2.3.4:12320) and execute this script:

 

mysqldump -u root --default-character-set=latin1 -c --insert-ignore \
--skip-set-charset railsapp_development > dev.db
mysqldump -u root --default-character-set=latin1 -c --insert-ignore \
--skip-set-charset railsapp_production > prod.db
mysqldump -u root --default-character-set=latin1 -c --insert-ignore \
--skip-set-charset railsapp_test > test.db
for i in dev prod test; do iconv -f ISO-8859-1 -t UTF-8 <$i.db >${i}8.db; done
 
for i in *8.db; do perl -pi -w -e 's/CHARSET=latin1/CHARSET=utf8/g;' $i; done

for i in railsapp_development railsapp_production railsapp_test; do \
  mysql --user=root --execute "DROP DATABASE $i; CREATE DATABASE $i \
  CHARACTER SET utf8 COLLATE utf8_general_ci;"; \
done

mysql --user=root --max_allowed_packet=16M --default-character-set=utf8 \
  railsapp_development < dev8.db
mysql --user=root --max_allowed_packet=16M --default-character-set=utf8 \
  railsapp_production< prod8.db
mysql --user=root --max_allowed_packet=16M --default-character-set=utf8 \
   railsapp_test < test8.db
 

After this actions all databases will be in utf8 by default and non-latin symbols will work!

it's the great script, that works

it's the great script, that works.

Thank you

Great script!!!! Works perfect.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)