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: XMLSeverity: 3 - Normal
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned 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
  • -unavailable- added by hadess (Posted a comment)
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by piotrdrag (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 19 Jan 2018 04:18:37 PM UTChaibleStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1