Opened 19 years ago
Closed 19 years ago
#1766 closed defect (fixed)
PageOutline macro does not work for non-English pages
Reported by: | MishaS | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | wiki system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I have a page in Russian, which uses '=' and '==' for headers. When the page was complete, I added [[PageOutline]]
macro to the page, the following error is produced:
Error: Macro PageOutline() failed 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
(I'm using some 0.9pre version)
Attachments (0)
Change History (3)
comment:1 by , 19 years ago
Milestone: | → 0.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Fix in r1922 is not enough.
This fix cuase unicode error on my japanese page.
The anchor_base
should be encoded, also.
--- formatter.py (revision 1930) +++ formatter.py (working copy) @@ -350,7 +350,7 @@ # an ID must start with a letter in HTML anchor = 'a' + anchor i = 1 - anchor = anchor.encode('utf-8') + anchor = anchor_base = anchor.encode('utf-8') while anchor in self._anchors: anchor = anchor_base + str(i) i += 1
I don't know that holding _anchors[] as encoded bytes is correct.
But at least, with patch above, my page and PageOutline
macro would be work.
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Sorry, this is already fixed in [1931] while I'm checking. :-)
Fixed in r1922. I should find a way to add an unit-test for the [[PageOutline]] macro, however.