Modify

Opened 15 years ago

Closed 12 years ago

#3333 closed defect (othersoftware)

key is displayed wrong when starting with unicode character

Reported by: stephankn Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: stephankn

Description (last modified by Don-vip)

There is a problem with unicode characters in the tags.

josm displays not the full name of the key in case this starts with a special unicode character.
Displayed name starts with the first latin character. It's not possible to edit the key to remove the wrong character.

can be reproduced 100% with the attached OSM file.

Attachments (5)

josmtagbug.osm (945 bytes ) - added by stephankn 15 years ago.
in this file josm displays the key only partially
josm-screenshot.png (19.1 KB ) - added by plaicy 15 years ago.
way-corrected.osm (595 bytes ) - added by plaicy 15 years ago.
ScreenShot001.png (5.9 KB ) - added by stephankn 15 years ago.
still broken with 1997
simple-screenshot.png (1.5 KB ) - added by plaicy 15 years ago.

Download all attachments as: .zip

Change History (19)

by stephankn, 15 years ago

Attachment: josmtagbug.osm added

in this file josm displays the key only partially

by plaicy, 15 years ago

Attachment: josm-screenshot.png added

by plaicy, 15 years ago

Attachment: way-corrected.osm added

comment:1 by plaicy, 15 years ago

Resolution: worksforme
Status: newclosed

I can not see any bug in the behaviour of josm in this case. After opening your josmtagbug.osm file the way is displayed like this:


The osm database contains this error. I could also correct this and save it in a new file (way-corrected.osm).

by stephankn, 15 years ago

Attachment: ScreenShot001.png added

still broken with 1997

in reply to:  1 comment:2 by stephankn, 15 years ago

Resolution: worksforme
Status: closedreopened

With 1997 it can still be reproduced. Can the locale selection have an influence on the display?

See screenshot:

still broken with 1997

comment:3 by anonymous, 15 years ago

  • changing the localization setting is the LAF dialog has no effect.
  • removing mappaint.nameOrder has no effect
  • system is Windows Vista

See config settings below. For whatever reason spaces did not survive the clipboard! Removed http-links as this was blamed to be spam.

Path: trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1997
Node Kind: directory
Last Changed Author: Gubaer
Last Changed Rev: 1997
Last Changed Date: 2009-08-25 22:45:57 +0200 (Tue, 25 Aug 2009)


Memory Usage: 981 MB / 5461 MB (906 MB allocated, but free)
Java version: 1.6.0_16

Plugins: AgPifoJeditgpxlakewalkerremotecontrolusertoolsutilspluginvalidatorwmsplugin
Plugin AgPifoJ Version: 16941
Plugin editgpx Version: 16793
Plugin lakewalker Version: 16621
Plugin remotecontrol Version: 16965
Plugin usertools Version: 14125
Plugin utilsplugin Version: 16735
Plugin validator Version: 16970
Plugin wmsplugin Version: 16872


audio.menuinvisible=true
cache.motd.html=1251323132
cache.motd.html.version=1997
cache.wmsplugin.expire=2419200
cache.wmsplugin.maxsize=250
commandstack.visible=true
conflict.minimized=true
conflict.resolution=extended
conflict.visible=true
coordinates=DECIMAL_DEGREES
download.gps=false
download.osm=true
download.tab=2
draw.rawgps.large=true
draw.rawgps.lines=false
draw.segment.relevant_directions_only=false
gui.geometry=1920x1097+0+29
history.visible=true
josm.version=1997
laf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
lakewalker.epsilon=3.0E-5
lakewalker.max_nodes=20000
lakewalker.max_segs_in_way=1000
lakewalker.maxcacheage=200
lakewalker.maxcachesize=500
lakewalker.startdir=south
lakewalker.thresholdvalue=115
language=en
lastDirectory=D:\osm
layerlist.visible=true
mappaint.nameOrder=name:enname:deint_namename
mappaint.use-antialiasing=true
marker.audiofromstart=false
marker.buttonlabels=false
osm-primitives.localize-name=false
osm-primitives.showid=true
pluginmanager.lastupdate=1249931617907
plugins=AgPifoJeditgpxlakewalkerremotecontrolusertoolsutilspluginvalidatorwmsplugin
projection=org.openstreetmap.josm.data.projection.Epsg4326
propertiesdialog.visible=true
proxy.anonymous=false
proxy.enable=false
relationlist.visible=true
save.keepbackup=false
selectionlist.visible=true
shortcut.groups.1=128
shortcut.groups.10=64
shortcut.groups.11=576
shortcut.groups.12=64
shortcut.groups.13=512
shortcut.groups.15=640
shortcut.groups.16=640
shortcut.groups.17=576
shortcut.groups.18=512
shortcut.groups.19=128
shortcut.groups.2=128
shortcut.groups.20=512
shortcut.groups.3=0
shortcut.groups.4=512
shortcut.groups.5=0
shortcut.groups.6=512
shortcut.groups.8=192
shortcut.groups.9=192
shortcut.groups.configured=true
slippy_map_chooser.max_tiles=200
toolbar=opensavedownloadupload|undoredo|preference|lakewalker-smltagging_Streets/Road (Unknown Type)
userlist.visible=true
validator.TagChecker.checkComplexBeforeUpload=false
validator.TagChecker.checkFixmesBeforeUpload=false
validator.TagChecker.checkKeysBeforeUpload=false
validator.TagChecker.checkValuesBeforeUpload=false
validator.TagChecker.paintBeforeUpload=false
validator.ignore=false
validator.layer=false
validator.tests=Coastlines=true,SimilarNamedWays=true,UntaggedNode=true,CrossingWays=true,NodesWithSameName=true,TagChecker=true,OverlappingWays=true,UnclosedWays=true,WronglyOrderedWays=true,UnconnectedWays=true,SelfIntersectingWay=true,DuplicatedWayNodes=true,UntaggedWay=true,DuplicateNode=true
validator.testsBeforeUpload=Coastlines=false,SimilarNamedWays=false,UntaggedNode=false,CrossingWays=false,NodesWithSameName=false,TagChecker=false,OverlappingWays=false,UnclosedWays=false,WronglyOrderedWays=false,UnconnectedWays=false,SelfIntersectingWay=false,DuplicatedWayNodes=false,UntaggedWay=false,DuplicateNode=false
validator.visible=true
wmsplugin.url.0.name=Landsat
wmsplugin.url.1.name=Landsat
wmsplugin.url.2.name=Open Aerial Map
wmsplugin.url.3.name=Open Aerial Map
wmsplugin.url.4.name=Yahoo Sat

comment:4 by plaicy, 15 years ago

Hmm. Here (Linux) it still works. Wild guess: Maybe be correct font is not available and the letter is invisible.

  1. Select node
  2. Edit tag
  3. Click inside key value
  4. Go to start (using Pos1, not arrow keys)
  5. Insert something (e.g. "x")
  6. Press right arrow twice

Where is cursor positioned? Before or after "n" (of "name:th"). If positioned before you may remove the character but have no visual feedback.

comment:5 by stephankn, 15 years ago

Priority: majornormal

You are right. The problem report was wrong in the way of not being able to edit.

It should state it's not possible to see that there is an error. I reduced the priority of the problem.

What causes this problem? Is it the Java-Fontrenderer? The font is available, the characters are rendered correctly.
For sure, this character at the start of a string is simply wrong. It adds a symbol on top of another character. You can add a space in front of the string to see the character.

I would prefer a display like the one plaicy has. So it's possible to recognize the problematic character and fix it.

by plaicy, 15 years ago

Attachment: simple-screenshot.png added

comment:6 by plaicy, 15 years ago

I have created a simple test application (DialogTest). If there the character is not displayed also it would be difficult for josm work around this problem. Screenshot of running the program:


PS: If someone needs it: Sources are included in jar file.

comment:7 by stephankn, 15 years ago

Tested your sample.

D:\osm>java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

D:\osm>java -jar DialogTest.jar
Shows the dialog including that extra character like shown in your screenshot.

What is the difference to josm?

comment:8 by plaicy, 15 years ago

It is totally different. It is just a JLabel, a JTextField, and a JButton. But in the moment I do not know why this test is displayed correctly and but inside JOSM it does not work. If I see correctly JOSM uses JComboBox and JTextComponent. Okay I could write another test using these component but I am not sure if that helps.

comment:9 by stoecker, 14 years ago

Owner: changed from team to stephankn
Status: reopenedneedinfo

Still an issue? AutoCompleteComboBox was fixed inbetween and maybe this was fixed as well?

comment:10 by stephankn, 14 years ago

Owner: changed from stephankn to team
Status: needinfonew

Problem still exists. In front of "name" is a diacritic mark combining character that is not rendered in JOSM. It's only noticeable that there is actually an additional character by moving the cursor with the arrow keys in the edit field. Rendering as shown in the test application would help.

Identification: JOSM/1.5 (3313 en)
Memory Usage: 175 MB / 2728 MB (114 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows Vista

comment:11 by Hojoe, 14 years ago

It depends on the look and feel. With a *not* windows L&F it works, but with windows L&F it dosn't.

comment:12 by stephankn, 14 years ago

I can confirm it is related to plaf. The sample http://josm.openstreetmap.de/attachment/ticket/3333/DialogTest.jar also shows the problem when switched to use windows look and feel instead of metal. I tried with jgoodies. Using their look and feel the problem also not visible.
Would it be possible to add jgoodies looks? I also feel they improve the l&f a lot. JOSM would benefit from this.
I'll file a bugreport with oracle for the plaf thing.

comment:13 by Don-vip, 12 years ago

Description: modified (diff)

FYI I filed this bug on the Oracle bugtracker: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7194099

comment:14 by Don-vip, 12 years ago

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.