About web.py
--

$def with(job)
$ title = job.name_cn + job.name + '招聘'
$:render.header(title)

<type 'exceptions.UnicodeDecodeError'> at /jobs/detail-1
('ascii', "title = job.name_cn + job.name + '\xe6\x8b\x9b\xe8\x81\x98'", 34,
35, 'ordinal not in range(128)')

is this webpy's problem?
and I try to do like this:

        title = this_job.name_cn + this_job.name + '招聘'
        return render.job.view(this_job, title)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 56:
ordinal not in range(128)

and then:
        title = this_job.name_cn + this_job.name + u'招聘'

It is OK.

why?
-- 
百才招聘(baicai.com).产品部
Email: [email protected]
Gtalk: [email protected]
twitter.com/qichangxing
http://blog.hi0791.com

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to