Skip to content

Conversation

@theodab
Copy link
Contributor

@theodab theodab commented Apr 1, 2025

Previously, shaka.util.StringUtils.fromBytesAutoDetect assumed any character between ' ' and '~' was ASCII.
This worked for many cases, but it meant that the method would be unable to determine the encoding of a buffer if there was a newline character near the start.
This could be a problem for parsing, for example, JSON.

Closes #8336

Previously, shaka.util.StringUtils.fromBytesAutoDetect assumed
any character between ' ' and '~' was ASCII.
This worked for many cases, but it meant that the method would
be unable to determine the encoding of a buffer if there was
a newline character near the start.
This could be a problem for parsing, for example, JSON.

Closes shaka-project#8336
@theodab theodab added type: bug Something isn't working correctly component: networking The issue involves the networking system of Shaka Player labels Apr 1, 2025
@shaka-bot
Copy link
Collaborator

Incremental code coverage: 100.00%

@joeyparrish joeyparrish merged commit b809646 into shaka-project:main Apr 1, 2025
44 of 48 checks passed
@theodab theodab deleted the utfDetectionBranch branch April 2, 2025 06:57
avelad pushed a commit that referenced this pull request Apr 4, 2025
Previously, shaka.util.StringUtils.fromBytesAutoDetect assumed any
character between ' ' and '~' was ASCII.
This worked for many cases, but it meant that the method would be unable
to determine the encoding of a buffer if there was a newline character
near the start.
This could be a problem for parsing, for example, JSON.

Closes #8336
avelad pushed a commit that referenced this pull request Apr 4, 2025
Previously, shaka.util.StringUtils.fromBytesAutoDetect assumed any
character between ' ' and '~' was ASCII.
This worked for many cases, but it meant that the method would be unable
to determine the encoding of a buffer if there was a newline character
near the start.
This could be a problem for parsing, for example, JSON.

Closes #8336
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label May 31, 2025
@shaka-project shaka-project locked as resolved and limited conversation to collaborators May 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

component: networking The issue involves the networking system of Shaka Player status: archived Archived and locked; will not be updated type: bug Something isn't working correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Line breaks in fetch error response results in null text

3 participants