Forum: 

Unicode characters turns into "?" by redmine

iav's picture

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

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.

Guest's picture

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!

zha's picture

it's the great script, that works.

Alexander's picture

Great script!!!! Works perfect.

Joe Price's picture

Thanks for the advice! Accidentally created my db in latin ("create database redmine;"), then needed to support chinese, russian, spanish, etc..

Post new comment