Project

General

Profile

a question about non latin languages

Added by shahar fleischman over 13 years ago

hi,

i'm trying to create a new project with heberw name and description.
after creating the project, i see the hebrew letters as ??.
please help.
my system is ubuntu 10.10 with redmine 1.2.0.

thanks.


Replies (15)

RE: a question about non latin languages - Added by Alex A over 13 years ago

What is locale in your database? There is no problem for utf-8

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

mysql-server-5.1
should i add something to the database, maybe some package ?
can it be system language support ?
thanks.

RE: a question about non latin languages - Added by Alex A over 13 years ago

If you run this command

mysql> show variables like "char%";

you must see a utf8 codepage. For another codepage you must change it for utf8

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

this is what i get:

mysql> show variables like "char%";
----------------------------------------------------+ | Variable_name | Value |
----------------------------------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | 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.00 sec)

is that ok or should i change something ?
thanks.

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

sorry, i hope this is better.

----------------------------------------------------+ | Variable_name | Value |
----------------------------------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ |
----------------------------------------------------+

RE: a question about non latin languages - Added by Alex A over 13 years ago

You have a latin codepage. Try like this

nano /etc/mysql/my.cnf

skip-character-set-client-handshake=1
default-character-set=utf8

/etc/init.d/mysql restart

You must see like

mysql> SHOW VARIABLES LIKE 'character_set_%';
Variable_name Value
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

ok, now it looks like that:

mysql> show variables like "char%";
----------------------------------------------------+ | Variable_name | Value |
----------------------------------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ |
----------------------------------------------------+
8 rows in set (0.00 sec)

restarted mysql and apache.
is there anything else that can do this problem ?
i still can't create project names in hebrew.
thanks.

RE: a question about non latin languages - Added by Alex A over 13 years ago

Can you recreate new database and try with new one?

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

i can, if i can keep the data and restore it, is there a way to preserve the data ?
thanks.

RE: a question about non latin languages - Added by Alex A over 13 years ago

shahar fleischman wrote:

i can, if i can keep the data and restore it, is there a way to preserve the data ?
thanks.

yes, but you must convert it to utf-8, may be

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

ok,

should i do the convert inside mysql or on a sql dump file ?
i never done that before.
thanks.

RE: a question about non latin languages - Added by Alex A over 13 years ago

shahar fleischman wrote:

ok,

should i do the convert inside mysql or on a sql dump file ?
i never done that before.
thanks.

try this script

mysqldump -uuser -ppassword --default-character-set=latin1 -n -K --skip-set-charset --skip-create-options --skip-extended-insert --compatible=mysql40 --max_allowed_packet=64K dbname > latin_dump.sql
iconv -f ISO-8859-1 -t UTF-8 latin_dump.sql > utf8_dump.sql
mysql --max_allowed_packet=1M -uuser -ppassword --default-character-set=utf8 database_utf8 < utf8_dump.sql
rm -f *.sql

RE: a question about non latin languages - Added by Alex A over 13 years ago

Or try sql command

ALTER TABLE 'table_name' CONVERT TO CHARACTER SET 'utf8';

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

ok, i will try one of these and see if it helps.
thanks for all your help.

RE: a question about non latin languages - Added by shahar fleischman over 13 years ago

hi,

after changing all the tables to utf8 and changing all variables to utf8, everything is working fine now.

thanks :)

    (1-15/15)