-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v6.x backport of 'latin1' encoding #8022
Conversation
When node began using the OneByte API (f150d56) it also switched to officially supporting ISO-8859-1. Though at the time no new encoding string was introduced. Introduce the new encoding string 'latin1' to be more explicit. The previous 'binary' and documented as an alias to 'latin1'. While many tests have switched to use 'latin1', there are still plenty that do both 'binary' and 'latin1' checks side-by-side to ensure there is no regression. PR-URL: nodejs#7111 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
A message stuck around in the native API warning users to not use 'raw' encoding. Followed by an abort(). This is no longer necessary since all other signs of 'raw' encoding have been removed. PR-URL: nodejs#7111 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
A missing 'break' statement unintentionally allowed "linary" and "luffer" as alternatives for "binary" and "buffer". Regression introduced in commit 54cc721 ("buffer: introduce latin1 encoding term".) PR-URL: nodejs#7262 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Make BINARY an alias for LATIN1 rather than a distinct enum value. PR-URL: nodejs#7284 Refs: nodejs#7262 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Looks like there were some Windows build issues. @addaleax are you particularly anxious to get this into v6.4.0? |
@cjihrig It wouldn’t be the end of the world if it doesn’t make it. 😉 Though, I think I can speak for me and at least @trevnorris in that we both would really like to see it landed in v6 at some point, because we see quite the value in moving away from |
I think I have seen these Windows errors before in an unrelated context, so running CI again: https://ci.nodejs.org/job/node-test-commit/4477/ |
|
||
* `'hex'` - Encode each byte as two hexadecimal characters. | ||
|
||
_Note_: Today's browsers follow the [WHATWG | ||
spec](https://encoding.spec.whatwg.org/) that aliases both `latin1` and | ||
`iso-8859-1` to `win-1252`. Meaning, while doing something like `http.get()`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick note, cc1318b contains documentation changes for these entries. not sure if it's worth while to also back port those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not worried about adding them in this PR. i don't even feel particularly strong about landing the doc changes. just thought it be useful to bring it up.
One comment/question. LGTM. |
These commits should have been The old one probably should have been |
@Fishrock123 Thanks for the comments, I wasn’t aware of that :/ |
Backport of #7111, half of #7262 (the other half already landed) and #7284.
/cc @nodejs/buffer
CI: https://ci.nodejs.org/job/node-test-commit/4461/