Re: Gnue and Greek UTF-8
John Proios <[email protected]> Mon, 08 Sep 2008 21:15:50 +0300
| Newsgroups | gmane.comp.gnu.enterprise.devel |
|---|---|
| Message-ID | <[email protected]> |
O/H John Proios έγραψε: > O/H David Ayers έγραψε: >> Hello Proios, >> >> Am Montag, den 08.09.2008, 09:21 +0300 schrieb John Proios: >> >> >>> I have one problem with gnue and greek utf-8. >>> >>> Storing all data in Mysql and my database support utf-8. >>> If write data(greek) in field on gnue-form view and storing normally. >>> But if try to read the data from my database (F8), the gnue-form do >>> it search and the come back chars is incomprehensible. >>> >> >> I've have had (and still have) many issues with international character >> sets and collations with the mysql Database so I understand your >> confusion. >> >> First I think you should have some general knowledge of the many >> different settings mysql allows. For an overview have a look at: >> >> http://dev.mysql.com/doc/refman/5.0/en/charset.html >> >> In general you can determine the current setting of a connection with: >> >> 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/ | >> +--------------------------+----------------------------+ >> >> As you can see you can determine the character set of the server, a >> database, client a connection... In fact you can even define a character >> set at table and column level. Some of these settings are merely >> defaults. >> >> To diagnose your issue correctly one would have to check the entire >> stack to see what went wrong. >> >> But a wild guess could be that the database and table was created with a >> default latin1 setting, GNUe provided UTF-8 data which got mapped to the >> corresponding latin1 characters within mysql and when you fetch, the >> latin1 data is converted to UTF-8. >> >> Maybe you could show us your: >> MySQL: my.conf >> GNUe: connections.conf [Carefull, rmeove all passwords] >> and the output of: >> mysql> show variables like "char%"; >> from an interactive mysql session. Also if you can copy the actual >> characters you wrote and the characters you received, they might also >> help in diagnosing the conversion issue. >> >> Cheers, >> David >> >> >> >> >> _______________________________________________ >> Gnue-dev mailing list >> [email protected] >> http://lists.gnu.org/mailman/listinfo/gnue-dev >> > Yes > one of issues is if change my /etc/mysql/my.cnf to this > > default-character-set=utf8 > init-connect = "SET NAMES utf8" > character-set-client-handshake > character-set-client-handshake=0 > skip-character-set-client-handshake > > > and mysql have now this setings > +--------------------------+----------------------------+ > | 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/ | > +--------------------------+----------------------------+ > > All from this time is ok. Install from svn the gnue and make samples > data and conf file to this: > connections.conf > [gnue] > comment = GNUe Test Database > aliases = dcl test > provider = mysql > host = localhost > dbname = gnue > [appserver] > comment = Connection to the GNUe Application Server > provider = appserver > rpctype = xmlrpc > host = localhost > port = 8765 > transport = http > authentication = no > > gnue.conf > change only the ;textEncoding = utf-8 > > if run the ~/bin/gfcvs appserver://..../address_person the form open > in UI curses and if press key greek the program break. > The error is ´utf8´ codec can´t decode byte 0xcf.... > > if install python-wxgtk2.8 and run the gnue-form with UI wx26 all work > fine. > > What have in gnue-forms curces ? bug ? > > > > _______________________________________________ > Gnue-dev mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/gnue-dev yes. find the problem. The issue is the python. I install debian etch (python 2.4.4 & python-wx2.6) and create on /usr/lib/python2.4/site-packages a file sitecustomize.py with this commands: import.sys sys.setdefaultencoding('UTF-8') The deferent with preview problem is it my disto is ubuntu with default python 2.5 & python-wx2.8. I don´t know how setup the gnue with python2.5 and python-wx2.8 All now with debian etch work fine. Thanks all again.