#16368 closed defect (fixed)
DateTimeException importing exported notes with persian numbers
Reported by: | iman | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.06 |
Component: | Core notes | Version: | latest |
Keywords: | persian locale import export i18n number date | Cc: |
Description
In Windows 7 my settings for region and language format is set to Persian.
When I export Notes it uses Persian digits for timestamps and then I cannot reimport it. By replacing Persian digits with English ones importing is done.
Attachments (1)
Change History (8)
by , 7 years ago
comment:1 by , 7 years ago
Keywords: | i18n added |
---|
comment:2 by , 7 years ago
Keywords: | number date added; notes windows removed |
---|---|
Milestone: | → 18.06 |
Summary: | Importing exported notes → DateTimeException importing exported notes with persian numbers |
Indeed:
<note id="-3" lat="34.1002049366592" lon="49.69561725586654" created_at="۲۰۱۸-۰۶-۰۸T۲۰:۱۵:۱۸+04" > <comment action="OPENED" timestamp="۲۰۱۸-۰۶-۰۸T۲۰:۱۵:۱۸+04" uid="4886954" user="user" is_new="true" >یادداشت</comment> </note>
java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 19014 at java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311) at java.time.temporal.ChronoField.checkValidValue(ChronoField.java:703) at java.time.LocalDate.of(LocalDate.java:267) at java.time.LocalDateTime.of(LocalDateTime.java:361) at java.time.ZonedDateTime.of(ZonedDateTime.java:339) at org.openstreetmap.josm.tools.date.DateUtils.tsFromString(DateUtils.java:92) at org.openstreetmap.josm.tools.date.DateUtils.fromString(DateUtils.java:72) at org.openstreetmap.josm.io.NoteReader$Parser.startElement(NoteReader.java:110) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327) at org.openstreetmap.josm.tools.XmlUtils.parseSafeSAX(XmlUtils.java:114) at org.openstreetmap.josm.io.NoteReader.parse(NoteReader.java:218) at org.openstreetmap.josm.io.OsmServerLocationReader$NoteParser.parse(OsmServerLocationReader.java:254) at org.openstreetmap.josm.io.OsmServerLocationReader$NoteParser.parse(OsmServerLocationReader.java:1) at org.openstreetmap.josm.io.OsmServerLocationReader.doParse(OsmServerLocationReader.java:136) at org.openstreetmap.josm.io.OsmServerLocationReader.parseRawNotes(OsmServerLocationReader.java:188) at org.openstreetmap.josm.io.OsmServerLocationReader.parseRawNotes(OsmServerLocationReader.java:183) at org.openstreetmap.josm.actions.downloadtasks.DownloadNotesTask$DownloadRawUrlTask.realRun(DownloadNotesTask.java:206) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143) ... 5 more
follow-up: 5 comment:3 by , 7 years ago
What happens for .osm files? Did they get a timestamp with persian numbers too?
follow-up: 6 comment:5 by , 7 years ago
Replying to Don-vip:
What happens for .osm files? Did they get a timestamp with persian numbers too?
No. At the same time .osm files had a timestamp with English numbers. There was no problem with .osm files.
comment:6 by , 7 years ago
Replying to Iman <iriman@…>:
No. At the same time .osm files had a timestamp with English numbers. There was no problem with .osm files.
OK so the fix should work :)
One bonus question: do you contribute to the Persian translation? We noticed someone updated it today. I would love to add this new language once the 2000 core strings threshold is reached.
comment:7 by , 7 years ago
thanks for the fix.
that's a good news. :)
I have it in my plan and wish to do it.
That contributor is not me, today I just registered on launchpad with no contribution yet.
Sample exported file with Persian locale on windows 7