https://issues.apache.org/jira/browse/CB-5468

I have three pull requests which I haven’t actually submitted:
BlackBerry [1], Cli [2], Plugman [3]

Windows for historical reasons doesn’t default to treating text files as UTF-8. 
Instead files are typically treated as Latin-1 or some other random historical 
encoding. If you want a file to be treated by your typical Windows program as 
UTF-8, you are expected to insert the UTF-8 version of the Unicode BOM at the 
start of the file.

Per ConfigurationFiles [4], CLI and Plugman take a user authored config.xml and 
generate a platform one (actually, the documentation there claims that only 
Plugman does so, but my work [2] indicates that CLI also does so 
occasionally…). That file is then used by platform code [1] and it could also 
be opened by the user (when there’s a problem).

Since Windows editors (including Eclipse on Windows [5]…) don’t use UTF-8 by 
default, the results can be fairly random or at least inconsistent with 
expectations.

I’m not absolutely certain that I like my patch set, I could probably get away 
with only doing [1], but it feels like the right behavior for a parser would be 
to honor the input format when producing output, I.e. If there were a BOM in 
the user’s config.xml, produce a BOM in the generated one…

Thoughts?


[1] https://github.com/blackberry/cordova-blackberry/compare/cb_5468?expand=1
[2] https://github.com/blackberry/cordova-cli/compare/cb_5468?expand=1
[3] https://github.com/blackberry/cordova-plugman/compare/cb_5468?expand=1
[4] http://wiki.apache.org/cordova/ConfigurationFiles
[5] 
http://stackoverflow.com/questions/13792061/why-does-eclipse-use-cp1252-encoding

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.

Reply via email to