Opened 14 years ago
Closed 14 years ago
#4461 closed defect (fixed)
Links in internal Russian Help works very strange
Reported by: | calibrator | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Now first call to Russian Help (in Russian version) JOSM 2916 works correct. But if click on any link, then next page of internal Russian Help looks very strange. See attached PrintScreen file, please.
PS: English Internal Help works correct.
Attachments (1)
Change History (11)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
Copy file first to C:\ and upload then. Seems this is a Trac bug - Trac should ignore that error as it is anyway in stripped part of the path.
by , 14 years ago
Attachment: | RussianStrangeHelp(pressAnyLink).PNG added |
---|
comment:4 by , 14 years ago
Status: | needinfo → assigned |
---|
comment:6 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
It seems to be a bug in JEditorPane.setPage() method which is called in HelpBrowser.openUrl() for all pages that doesn't start with "http://josm.openstreetmap.de/wiki/Help".
comment:7 by , 14 years ago
Probably we need to load the page directly like the JOSM help pages. We should reset the CSS for pages not from http://josm.openstreetmap.de/.
comment:8 by , 14 years ago
Problem shows in those wiki pages that doesn't start with "Help", for example http://josm.openstreetmap.de/wiki/Introduction
Probem in CSS sheet indeed: http://josm.openstreetmap.de/chrome/common/css/trac.css
body { background: #fff; color: #000; margin: 10px; padding: 0; }
I think #fff
is interpreted as #000fff
by Java.
Possible solutions:
- use fetchHelpTopicContent() for all JOSM wiki pages, not only these that starts with "Help"
- Find a way to make JEditorPane.setPage() ignore CSS stylesteets.
- Do not use JEditorPane.setPage() at all, use HttpURLConnection + JEditorPane.setText(), but do not prettify contents with prepareHelpContent().
comment:9 by , 14 years ago
I tested without CSS and I got a page which looked binary (German help, click on link to OSM webpage). Probably setPage() did not undo gzip for the contents.
Best seems to switch to own loader for all pages and handle correctly handle the CSS settings.
comment:10 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
PPS: I can not attach file to ticket. I recieve error message during upload to Track:
Trac detected an internal error:
UnicodeDecodeError: ('ascii', 'C:
Documents and Settings
Parfenov_SN
\xd0\x9c\xd0\xbe\xd0\xb8 \xd0\xb4\xd0\xbe\xd0\xba\xd1\x83\xd0\xbc\xd0\xb5\xd0\xbd\xd1\x82\xd1\x8b
\xd0\x9c\xd0\xbe\xd0\xb8 \xd1\x80\xd0\xb8\xd1\x81\xd1\x83\xd0\xbd\xd0\xba\xd0\xb8
Strange_Russian_Help.PNG', 38, 39, 'ordinal not in range(128)')