Ticket #3893 (closed defect: worksforme)

Opened 1 year ago

Last modified 1 year ago

Merge for wiki pages with not ansi titles doesn't work

Reported by: sergray Assigned to: chmullig
Priority: normal Component: TracMergeScript
Severity: minor Keywords:
Cc: Trac Release: 0.10

Description

I have the page named like:

(Pdb) p oldPageName
u'\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f'

When tracmerge is exporting it, I get the following error.

Page web:WikiStart is now merged:OldStarts/web
Traceback (most recent call last):
  File "dorogatv.py", line 91, in <module>
    main()
  File "dorogatv.py", line 88, in main
    merge.merge()
  File "/home/panfilov/tracmergescript/tracmerge.py", line 106, in merge
    self.mergeWiki()
  File "/home/panfilov/tracmergescript/tracmerge.py", line 151, in mergeWiki
    print u"Page %s:%s is now %s:%s" % (sTrac['name'], oldPageName, pageDest, pageData[-1]['name'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-18: ordinal not in range(128)

Please note, I've modified output format string in hope, that it will work. However it didn't work and python still is using ascii codec for conversion.

Attachments

Change History

10/13/08 13:33:52 changed by sergray

Well, it seems my changes were not needed, so I turned tracmerge.py to original version and set up the default encoding to koi8-r. However it didn't help, because all string arguments in all printouts need explicit encoding conversions. Implicit conversion for unknown for me reason is done to ansi.

10/14/08 10:19:52 changed by sergray

  • status changed from new to closed.
  • resolution set to worksforme.
  • severity changed from blocker to minor.

Workaround exists, so I'm lowering the severity. It's possible to run tracmerge.py without modifications, but sys.stdout.encoding has to be set to the locale encoding, e.g. using LANG.


Add/Change #3893 (Merge for wiki pages with not ansi titles doesn't work)




Change Properties
Action