Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#5653 closed defect (fixed)

Preview and commit will not work if there have Chinese character in wiki pages

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/", line 163, in process_request
    self.process_xml_request(req, content_type)
  File "build/bdist.linux-i686/egg/tracrpc/", line 167, in process_xml_request
    args, method = xmlrpclib.loads('Content-Length'))))
  File "/usr/lib/python2.5/", line 1130, in loads
  File "/usr/lib/python2.5/", line 817, in end
    return f(self, join(self._data, ""))
  File "/usr/lib/python2.5/", line 907, in end_value
  File "/usr/lib/python2.5/", line 864, in end_string
    data = _decode(data, self._encoding)
  File "/usr/lib/python2.5/", line 164, in _decode
    data = unicode(data, encoding)
  File "/usr/lib/python2.5/encodings/", 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

Attachments (1)

Preview_w_chinese_chars.png (19.5 KB) - added by Ivan 14 years ago.
Preview with chinese charactes

Download all attachments as: .zip

Change History (10)

Changed 14 years ago by Ivan

Attachment: Preview_w_chinese_chars.png added

Preview with chinese charactes

comment:1 Changed 14 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:

Let me know if it fixes the issue for you


comment:2 in reply to:  1 Changed 14 years ago by zuowei

Replying to ivangsa:

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...

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

Let me know if it fixes the issue for you


  1. I can confirmed that the encoding setting in client is UTF8, I can compose wiki page in Chinese with this plugin,and the character display without problem.
  1. I tried your updated version,the problem still be there
  1. I checked the eclipse log file this time,when I click preview tab,I got the error message
!ENTRY org.eclipse.ui 4 0 2009-08-12 09:52:38.063
!MSG Unhandled event loop exception
	at $Proxy0.wikiToHtml(Unknown Source)
	at org.trachacks.wikieditor.rpc.WikiClientImpl.wikiToHtml(
	at org.trachacks.wikieditor.service.WikiServiceImpl.wikiToHtml(
	at org.trachacks.wikieditor.eclipse.plugin.model.Page.wikiToHtml(
	at org.trachacks.wikieditor.eclipse.plugin.editor.WikiPreview.showContent(
	at org.trachacks.wikieditor.eclipse.plugin.editor.WikiEditor.pageChange(
	at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(
	at org.eclipse.swt.widgets.TypedListener.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.notifyListeners(
	at org.eclipse.swt.custom.CTabFolder.setSelection(
	at org.eclipse.swt.custom.CTabFolder.onMouse(
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Display.runDeferredEvents(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.ui.internal.Workbench.runEventLoop(
	at org.eclipse.ui.internal.Workbench.runUI(
	at org.eclipse.ui.internal.Workbench.access$4(
	at org.eclipse.ui.internal.Workbench$
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.equinox.launcher.Main.invokeFramework(
	at org.eclipse.equinox.launcher.Main.basicRun(
Caused by: org.apache.xmlrpc.client.XmlRpcClientException: Failed to read servers response: Server returned HTTP response code: 503 for URL:
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(
	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(
	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(
	at org.apache.xmlrpc.client.XmlRpcClient.execute(
	at org.apache.xmlrpc.client.XmlRpcClient.execute(
	at org.apache.xmlrpc.client.XmlRpcClient.execute(
	at org.trachacks.wikieditor.rpc.xmlrpc.WikiRPCClientFactory$1.invoke(
	... 40 more

  1. I found the error message
    Server returned HTTP response code: 503 for URL:

then I checked my network status,everything is ok, and I can download this DTD file in browser correctly

comment:3 Changed 14 years ago by Ivan


from the original post, the problem seems to happen on the server side:

> UnicodeDecodeError: 'utf8' codec can't decode byte 0xd5 in position 1646: unexpected end of data

that may be the reason the xmlrpc plugin is returning 503 error code status

Lets try one thing:

can you update the WikiEditorForEclipsePlugin?action=edit and see if you can preview/commit chinese characters there, just to isolate the problem, I could do a preview using the plugin and the Track-Hacks site

lets see how it goes..

comment:4 Changed 14 years ago by zuowei

  1. I tested in Trac-hacks site,there have no such problem,I can use Chinese character,preview and commit work properly.
  2. As you said,the problem should be caused by xmlrpc plugin on the server side,could you give me some advice on how to solve this problem came from xmlrpc plugin?

comment:5 in reply to:  4 Changed 14 years ago by Ivan

Replying to zuowei:

well, I would probably collect as much information about your server setup:

  • Trac and plugin versions,
  • Python version
  • OS default charset
  • Apache web server set up
  • ...

and with that information would ask in XmlRpcPlugin

Maybe you could also test it trough different rpc clients, like creating a ticket with chinese characters through Mylyn integration, or make sure you can create a wiki page through the web... anything may help isolate the problem...

Anyway, good luck, and if you find the solution and you think it may help other users you can also add an entry in WikiEditorForEclipsePlugin/FAQ


comment:6 Changed 14 years ago by zuowei

  1. I checked the setting of server,and found the problem came out after I upgraded python packages for testing Chinese wiki page export function(pdf file) ,then I re-installed the python,but the problem still be there.
  1. Because I can't figure out which python modules lead to such problem, I had to purged python package and all python modules from server,and re-install them one by one,the problem disappeared this time
  1. The software I used:
    • Trac : 0.11.5
    • TracXmlRPC : 1.0.6
    • TracExtendedXmlRPC : 0.1
    • TracTags :0.6
    • TracTocMacro:
    • TracWikiPrintPlugin : 1.6
    • ReportLab : 2.3
    • Html5lib : 0.11.1
    • Pisa : 3.0.32
    • Python : 2.5.4
    • pyPdf : 1.12

  • default character : zh_CN.utf8
  • apache: 2.2.11
  • mod_python : 3.3.1
  1. So this problem had been solved,but it's a pity that I don't know why

Thanks Ivan's help.



comment:7 Changed 14 years ago by zuowei

I confirmed that the problem caused by ReportLab 2.3.

B.Rgds zuowei

comment:8 Changed 14 years ago by Ivan

Resolution: fixed
Status: assignedclosed

comment:9 Changed 13 years ago by anonymous

Virtually any tradition that has hand techinque earth specifically is unquestionably connected with virtually any smoking progress which often usually may start for influence intro or maybe that impact which is gathered in the men and women all-around. Due to which, experts get produced any products that may aid men and women fade away fully by using smoking cigarettes.

Receiving electronic cigarettes could be a good start when ever gonna give up smoking. Tobacco even so could be present or maybe normally in addition to excellent connected with choice because of the group boss which employs electric cigarette.

This specific item moreover moves because of the identifying connected with electronic cigarette or possibly customized vaporizer which is in addition developed through China medical health care provider. His or her generation prompted men and women via Oughout. azines. several nations in the eu to receive that products. The exact electric cigarette twigs to be able to employing methods that and a battery pack group which often creates cigarette smoking in to your body, nonetheless simply creates smoke a pipe from the atmosphere stream that are you deal with. To allow you coordinate your own needing with regard to methods that without endangering all those around a person. Almost every energy provide offers that which is often details of twelve so that they can 30 cigarettes in addition to every products of E-cigarettes offers many ones.

Properly, even though advertised after a while there was several prevent smoking cigarettes answers Or maybe aids brought to you out there to support individuals who end up organized opt for naturally healthy lifestyle in addition to make money so that they can avoid medical implications compelled by using tobacco smoking.

After that, the theory electronic cigarette vaporized your own fresh treatment as well as the cigarette smoking in the tablet in addition to mouth piece. This is one way therapy arrive within. if the male or female wants to minimize in addition to finally give up smoking; all those could make to make use of the many forms of cigarette smoking printer bottle. All-around cigarette smoking is simply not a problem established best nicotine-content printer container is actually used because the electric cigarette includes any ingenious chip which often offers out only fair degree of cigarette smoking if the man or women is actually implementing the store's instrument.

Included in this are abundant medical professional nonetheless in all honesty there is not necessarily a significant capture an average passionate smoking efficianado may assure that achievements connected with this kind connected with other possibilities as well as exhaust financial endurance that route regarding unfit smoking cigarettes is in fact tempting the store's particular person with regard to greatest joy with regards to genuine methods that want.

Suggestions that circumstances by using 99% with regards to men and women that you should decisions connected with cigarette smoking, nonetheless by using a while in addition to engineering that review will manufacture in addition to amazing cigarette referred to as Electronic Cigarette, In the used cigarette, electric cigarette, cigarette smoking choice in addition to energy provide centric cigarette which allows end users to fulfill the store's urges connected with cigarette smoking from the wholesome design. The exact legitimacy regarding electric cigarette is in fact legitimate considering that it really is used across the world. As soon as with this report nights golf equipment or maybe rapid meals stores, you won't need to glimpse the store's cigarettes place because doing so won't want hearth not the idea cigarette smoking.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ivan.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.