When I say I have unicode problems (UnicodeDecode exceptions), people point me 
to documents like : 
- http://www.amk.ca/python/howto/unicode 
- http://pycheesecake.org/wiki/ZenOfUnicode

Which are absolotuly good, but helpless. I'm not asking to know the bolts and 
nuts of unicode. I'm not asking how many bytes it will store my characters in. 
That wont help me set up my application to work. It's good to know all that, 
but not sufficient.

I'm asking of a configuration problem, not only at application level but 
system-wide.

The one that was the most helpful was 

http://pylonshq.com/docs/en/0.9.7/tutorials/understanding_unicode/

I'm writing my first pylons app, using SQLAlchemy over MySQL. So I thought 
maybe the best thing to read, and the best form it can have, is a kind of 
checklist, a sort of condensed form of the "understanding unicode" document of 
pylonshq docs (link above).

You want to have fun with pylons using unicode ? here's what you want to do :

* Database configuration
** Set your database to unicode
** Set your tables to unicode
** Set your colunms to unicode (some databases like MySQL allow that)
** If you use Oracle check this link (some link here) and look for paragraph 
"paragraph heading"
** check item ...

* Source code
** put -*- encoding:utf-8 -*- at the begining of every file
** make sure you add the prefix "u" (u"string") at every string you want to 
insert in the database
** check item ...

* System configuration
** Set your systems local to unicode (is that necessary ?)
** Set your terminal to unicode if you want to use the interpreter (paster 
shell...) (is that necessary)
** check item ...

* Do you use an external application to insert your data ? (phpmyadmin for 
example ?)
** check its character set
** check the character set of the source files (some php scripts may be encoded 
in latin)
** check item

* sub checklist...
** check item...

So basically, if someone has this kind of checklist avaiable somewhere, or has 
enough time to write his own, that would be *really* helpful. I propose that 
this kind of check list be available in the pylons wiki so that everyone can 
easily contribute. There's actually one right here 
http://wiki.pylonshq.com/display/pylonsdocs/Unicode, but it's in the official 
pylons documentation. I propose to create the Unicode checklist page in the 
pylonscookbook here 
http://wiki.pylonshq.com/display/pylonscookbook/Unicode+checklist 

Thank you. My ears are bleeding. Mercy.

Y.Chaouche


      

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to