Modify

Opened 2 years ago

Closed 17 months ago

#21593 closed defect (othersoftware)

Unicode characters in notes

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core notes Version:
Keywords: emoticons, unicode, javabug Cc:

Description

There are notes with non-letter characteres like emoticons as part of the notes. The notes are correctly parsed in web, but not in JOSM. One example is this note: https://www.openstreetmap.org/note/814497
It has a house emoticon.

Attachments (0)

Change History (7)

comment:1 by skyper, 2 years ago

Yes, I can reproduce with latest.
Please, always add your status report to tickets of type defect. It is much easier if we now your JOSM version, java version, operating system, language setup and encoding settings.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-11-20 00:34:04 +0100 (Sat, 20 Nov 2021)
Revision:18324
Build-Date:2021-11-20 02:31:12
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18324 en) Linux Debian GNU/Linux 11 (bullseye)
Java version: 17.0.1+12-Debian-1deb11u2, Debian, OpenJDK 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarculaLaf
Environment variable LANG: en_US.utf8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US

Plugins:
+ flatlaf (35862)

comment:2 by skyper, 2 years ago

Priority: minornormal

comment:3 by skyper, 2 years ago

See also #21597.

comment:4 by gaben, 2 years ago

The emoticon vanishes here josm/trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java?rev=17299#L100. It's an internal JDK method call, so the parsing needs to be changed.

comment:5 by gaben, 2 years ago

So the JEditorPane component used for note rendering utilizes HTML 3.2 (introduced in January 1997). It limits the possibilities and it is the source of the issue.

On StackOverflow, they recommend something JavaFX based solution for HTML rendering, but I think that is too much.

comment:6 by taylor.smock, 17 months ago

It looks like it is working in Java 19 (Mac), and I suspect it works in Java 18.

See https://openjdk.org/jeps/400 (Java 18).

comment:7 by taylor.smock, 17 months ago

Keywords: javabug added
Resolution: othersoftware
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
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.