Opened 15 years ago

Last modified 11 years ago

#5653 closed defect

Preview and commit will not work if there have Chinese character in wiki pages — at Version 1

Reported by: zuowei Owned by: Ivan
Priority: normal Component: WikiEditorForEclipsePlugin
Severity: normal Keywords: Chinese, unicode, preview, commit
Cc: Trac Release: 0.11

Description (last modified by Ivan)

  1. If I composed a new wiki page in Chinese,when click preview tab,nothing will be displayed,just blank page,and this page can't be committed to server
  1. If I add some Chinese characters to the exist English page,the preview didnot work too,and I can't commit the page to server
  1. If the page only be composed in English,everything is ok.
  1. I got some error message from Trac server when I commit the page to the Trac server:
File "build/bdist.linux-i686/egg/tracrpc/web_ui.py", line 163, in process_request
    self.process_xml_request(req, content_type)
  File "build/bdist.linux-i686/egg/tracrpc/web_ui.py", line 167, in process_xml_request
    args, method = xmlrpclib.loads(req.read(int(req.get_header('Content-Length'))))
  File "/usr/lib/python2.5/xmlrpclib.py", line 1130, in loads
    p.feed(data)
  File "/usr/lib/python2.5/xmlrpclib.py", line 817, in end
    return f(self, join(self._data, ""))
  File "/usr/lib/python2.5/xmlrpclib.py", line 907, in end_value
    self.end_string(data)
  File "/usr/lib/python2.5/xmlrpclib.py", line 864, in end_string
    data = _decode(data, self._encoding)
  File "/usr/lib/python2.5/xmlrpclib.py", line 164, in _decode
    data = unicode(data, encoding)
  File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd5 in position 1646: unexpected end of data


  1. I attached a wiki page in text format,two Chinese characters added in the bottom of page for testing

Change History (2)

Changed 15 years ago by Ivan

Attachment: Preview_w_chinese_chars.png added

Preview with chinese charactes

comment:1 Changed 15 years ago by Ivan

Description: modified (diff)
Status: newassigned

It may be that UTF8 is a not supported charset encoding in your client computer and the plugin is not handling it properly

I can actually preview chinese characters...

Preview with chinese charactes

I have updated the plugin to use default encoding if utf8 is not supported. You can install it from the testing update site:

http://trac-hacks.org/svn/wikieditorforeclipseplugin/trunk/releases/update-site/

Let me know if it fixes the issue for you

Regards
Ivan

Note: See TracTickets for help on using tickets.