Opened 11 years ago

Closed 11 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:


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)

RussianStrangeHelp(pressAnyLink).PNG (85.4 KB) - added by calibrator 11 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 11 years ago by calibrator

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
\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)')

comment:2 Changed 11 years ago by stoecker

Owner: changed from team to calibrator
Status: newneedinfo

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.

Changed 11 years ago by calibrator

comment:3 Changed 11 years ago by calibrator


comment:4 Changed 11 years ago by calibrator

Status: needinfoassigned

comment:5 Changed 11 years ago by stoecker

Same for all languages.

comment:6 Changed 11 years ago by Upliner

Owner: changed from calibrator to team
Status: assignednew

It seems to be a bug in JEditorPane.setPage() method which is called in HelpBrowser.openUrl() for all pages that doesn't start with "".

comment:7 Changed 11 years ago by stoecker

Probably we need to load the page directly like the JOSM help pages. We should reset the CSS for pages not from

comment:8 Changed 11 years ago by anonymous

Problem shows in those wiki pages that doesn't start with "Help", for example

Probem in CSS sheet indeed:

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 Changed 11 years ago by stoecker

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 Changed 11 years ago by stoecker

Resolution: fixed
Status: newclosed

(In [3043]) fix #4461 - external pages in Help browser wrong

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.