fix: set application/css-sourcemap+json default charset to unicode #764
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After a Sprockets 4.x upgrade the CSS sourcemaps seemed to be assuming ASCII-8BIT and causing errors within the asset pipeline for SCSS which contained Unicode chars due to corruption going through the pipeline.
After a bit of digging, it seemed that was caused by an equivalent issue to #669 except for SCSS with Unicode in it (
Encoding::UndefinedConversionError at "\xC3" from ASCII-8BIT to UTF-8
). This is an issue only whendebug: true
is enabled for an asset and thus with sourcemap generation enabled.In #669 (
4.1.0
) the default charset for JS sourcemaps was corrected to UTF-8. However the default charset forapplication/css+sourcemap+json
is still currently ending up asASCII-8BIT
, even when source has a non-ASCII character in it. For consistency and correctness, it seems that these should also be assumed to be Unicode.This PR also reinstates the changelog for the previously-released
4.1.1
which seemed to have been (accidentally?) removed in 17d7723 This was rather confusing when reading the changelog.