Modify

Opened 11 years ago

Closed 11 years ago

#5226 closed enhancement (fixed)

XML encodings and byte-order marker (BOM) support

Reported by: pinkduck Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: XML, encoding, BOM, UTF-16, UTF-16LE, UTF16-BE, UTF-8, Byte-order Marker Cc:

Description

JOSM 3366 loads OSM files in UTF-8 without optional leading byte-order marker, but fails if the optional BOM is present. It does not currently accept UTF16 (with or without byte-order marker), or UTF16-LE or UTF16-BE encodings. Where the .osm load fails JOSM currently reports either:

Could not read file '<filename>'.
Error is:
Line 1 column 1: Content is now allowed in prolog.

or

Could not read file '<filename>'.
Error is:
Line 1 column 2: The markup in the document preceding the root element must be well-formed.

Supporting standard XML encodings would improve cross-platform support and prevent needless errors for valid XML files.

http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Byte_order_mark

http://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes

Attachments (1)

Encoding Tests.zip (4.5 KB) - added by pinkduck 11 years ago.
Example OSM file encodings to test against

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by pinkduck

Attachment: Encoding Tests.zip added

Example OSM file encodings to test against

comment:1 Changed 11 years ago by stoecker

Type: defectenhancement

comment:2 Changed 11 years ago by bastiK

Resolution: fixed
Status: newclosed

(In [3372]) fixed #5226 - XML encodings and byte-order marker (BOM) support

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.