bugGNU gettext - Bugs: bug #52932, XML doesn’t default to UTF-8

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #52932: XML doesn’t default to UTF-8

Submitter:  Piotr Drąg <piotrdrag>
Submitted:  Fri 19 Jan 2018 03:36:25 PM UTC
   
 
Category:  XML Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Tue 23 Jan 2018 09:38:16 AM UTC, comment #2: 

Because XML's default encoding, when the file lacks a BOM, or an encoding statement, is UTF-8, and it's considered a "fatal error" to be in a different encoding than the one specified (explicitly or not).

https://www.w3.org/TR/xml/#charencoding

Bastien Nocera <hadess>
Fri 19 Jan 2018 04:18:37 PM UTC, comment #1: 

Why? Why make an assumption about the encoding (that assumption can be wrong) - thus possibly produce an file in another encoding than the one the caller expects? When we have a way to get away without this assumption and produce a valid and unambiguous XML always.

Bruno Haible <haible>
Group administrator
Fri 19 Jan 2018 03:36:25 PM UTC, original submission:  

If an XML file doesn’t specify encoding (or the XML declaration is missing altogether), then gettext uses an alternative character representation (&#xXXXX;). It should rather just default to UTF-8.

Piotr Drąg <piotrdrag>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hadess (Posted a comment)
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by piotrdrag (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-19 haible StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code