Hi all,

I'm from China and recently I am studying turbogears so that I might
use it in my next commercial project. Actually it is not likely that my
boss allow me to use turbogears in that project because very few people
in China have heard of Python , not to speak of turbogears.

So it's most because of my personal interest in Python that made me
wrote this.

Hope it will help people from countries where people don't speak
English. And hope u can point out my mistakes.

Each mail while be short, but I will keep replying to this thread
frequently.

TIP 1.
~~~~
If you want to use VIM(or other text editors) to edit a kid file, set
encoding=utf-8, or the characters other than English would cause
problems.

I thought it might because that kid could only process utf-8 strings.

TIP 2.
~~~~
If a column might contains non utf-8 characters, define it like this in
model.py

UnicodeCol(dbEncoding = "gb2312")

BTW: It seems CatWalk doesn't recognize this and keepet me from adding
data that contains Chinese.

TIP 3.
~~~~
You want to use standard widgets but you found it doesn't work with
Chinese!

Than you should add this at the top of your code
# -*- coding: gb2312 -*-

And then add a u before any string that contains Chinese Character.

BTW: I've tried to change the whole source file to utf-8 encoded to
save the problem of add lot of 'u's, but it doesn't work.

TIP 4.
~~~~
Something interesting.

If u have ever tried the 20 minutes wiki tutorial, run it and type
something like this in your browser's address box.

http://localhost:8080/一些中文字符

Press Enter. As the page does not exist, you will reach the edit Page.
Input some text and then save.

Oops! Something wrong happened but if you check the database you will
see a new page has been added.

So my suggestion is that try to avoid include any Characters other than
English in the URLs of your project.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to