Opened 7 months ago

Last modified 7 months ago

#21593 new defect

Unicode characters in notes

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


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:
It has a house emoticon.

Attachments (0)

Change History (5)

comment:1 Changed 7 months ago by skyper

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)
Build-Date:2021-11-20 02:31:12

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

+ flatlaf (35862)

comment:2 Changed 7 months ago by skyper

Priority: minornormal

comment:3 Changed 7 months ago by skyper

See also #21597.

comment:4 Changed 7 months ago by gaben

The emoticon vanishes here josm/trunk/src/org/openstreetmap/josm/gui/widgets/ It's an internal JDK method call, so the parsing needs to be changed.

comment:5 Changed 7 months ago by gaben

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.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to anonymous
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

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

Note: See TracTickets for help on using tickets.