Public File API uses incorrect file encoding strings #866

mikechambers opened this Issue May 11, 2012 · 3 comments


None yet
3 participants

mikechambers commented May 11, 2012

As discussed in this thread:!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

says that encodings should be specified by their IANA names:

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


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

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:

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


pthiess commented May 11, 2012

Assigning to Mike @mikechambers .

@mikechambers mikechambers referenced this issue May 13, 2012


Issue866 #874


redmunds commented May 17, 2012

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


mikechambers commented May 18, 2012

Fixed in pull request #874

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