Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Public File API uses incorrect file encoding strings #866

Closed
mikechambers opened this Issue · 3 comments

3 participants

@mikechambers

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.

@mikechambers mikechambers was assigned
@pthiess
Owner

Assigning to Mike @mikechambers .

@mikechambers mikechambers referenced this issue
Merged

Issue866 #874

@redmunds
Collaborator

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

@mikechambers

Fixed in pull request #874
#874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.