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

Submitted by:  Piotr Drąg <piotrdrag>
Submitted on:  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>
Project 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>

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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.3