Public File API uses incorrect file encoding strings #866

Closed
mikechambers opened this Issue May 11, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

mikechambers commented May 11, 2012

As discussed in this thread:

https://groups.google.com/forum/?fromgroups#!topic/brackets-dev/6F78iuxKyq0

The public File APIs in brackets use the incorrect strings for specifying encoding types (currently only "utf8" is supported).

To summarize, the HTML5 File System draft

http://dev.w3.org/2006/webapi/FileAPI/#encoding-determination

says that encodings should be specified by their IANA names:

http://www.iana.org/assignments/character-sets

So, for example, to open a file with UTF 8 encoding, the encoding
should be specified as:

"UTF-8"

Currently brackets uses the "utf8" string, which is counter to the
specification.

However, internally, we need to specify the strings in the "utf8" format, in order to maintain compatibility with the NodeJS API.

It appears that this will require changes in:
NativeFileSystem.js
FileUtils.js

It will also require that a number of tests are updated to use the appropriate string.

So, the work required is:

  1. Change public APIs to accept and use correct file encoding Strings.
  2. Ensure that internal calls use correct encoding format for NodeJS
  3. Create constants for the encoding types for public use (in able to allow us to change the encoding strings in the future).

If there are no objections, then I will take care of this.

@ghost ghost assigned mikechambers May 11, 2012

Member

pthiess commented May 11, 2012

Assigning to Mike @mikechambers .

@mikechambers mikechambers referenced this issue May 13, 2012

Merged

Issue866 #874

Contributor

redmunds commented May 17, 2012

Fixed But Not Closed. @mikechambers please confirm that this is fixed and close it.

Contributor

mikechambers commented May 18, 2012

Fixed in pull request #874
#874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment