Opened 19 years ago
Closed 18 years ago
#1194 closed defect (fixed)
can't list Chinese tags
| Reported by: | dlin | Owned by: | Alec Thomas |
|---|---|---|---|
| Priority: | normal | Component: | TagsPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.10 |
Description
When I edit some pages with Chinese tags, it can show in tags cloud. But when I click such tag, it occurs following errors:
007-02-09 13:17:13,729 Trac[macros] ERROR: Invalid expression ''?餅?''
Traceback (most recent call last):
File "/home/dlin/tagsplugin/tractags/macros.py", line 188, in render_listtagged
expr = Expression(expression)
File "/home/dlin/tagsplugin/tractags/expr.py", line 35, in __init__
self.expression = ' '.join(expr)
File "/usr/local/lib/python2.4/compiler/transformer.py", line 54, in parse
return Transformer().parseexpr(buf)
File "/usr/local/lib/python2.4/compiler/transformer.py", line 133, in parseexpr
return self.transform(parser.expr(text))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-2: ordinal not in range(128)
Attachments (1)
Change History (9)
Changed 19 years ago by
| Attachment: | tags-unicode2.diff added |
|---|
comment:1 Changed 19 years ago by
comment:2 follow-up: 4 Changed 19 years ago by
It still not solve, it display following error message when I click one Chinese keyword on tags clouds.
'ascii' codec can't encode characters in position 1-2: ordinal not in range(128)
comment:3 Changed 19 years ago by
On our site, this patch works all right :-).
Please marge this patch into trunk.
comment:4 Changed 19 years ago by
Replying to dlin.tw@gmail.com:
It still not solve, it display following error message when I click one Chinese keyword on tags clouds.
Can you attach full error trace from environment log file?
comment:5 Changed 19 years ago by
2007-04-12 15:24:48,969 Trac[macros] ERROR: Invalid expression ''\xe9\x9b\xbb\xe6\x96\x87''
Traceback (most recent call last):
File "/home/dlin/tagsplugin/tractags/macros.py", line 188, in render_listtagged
expr = Expression(expression)
File "/home/dlin/tagsplugin/tractags/expr.py", line 35, in __init__
self.expression = (u' '.join(expr)).encode('utf-8')
File "/usr/local/lib/python2.4/compiler/transformer.py", line 54, in parse
return Transformer().parseexpr(buf)
File "/usr/local/lib/python2.4/compiler/transformer.py", line 133, in parseexpr
return self.transform(parser.expr(text))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-2: ordinal not in range(128)
comment:6 Changed 19 years ago by
I'm experiment little with pluging source code, but I cannot understand why you have such error on your site after applying my patch
comment:7 Changed 19 years ago by
It workable now, I found I forgot to restart apache, that caused the problem. Could you merge tags-unicode2.diff into trunk?
comment:8 Changed 18 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |



My potential unicode problem fix - tags-unicode2.diff