x/text/encoding/charmap: windows1252 encoding not decoding properly #28298
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version go1.10.1 linux/amd64
Does this issue reproduce with the latest release?
Did not test with 1.11; I think this is not relevant because the charmap package is external?
What operating system and processor architecture are you using (
go env
)?Standard linux amd64 env.
What did you do?
Conversion of a Windows1252 text to UTF-8 using
golang.org/x/text/encoding/charmap
gives an incorrect result;iconv
(both the Linux CLI and the library used via CGO) work as expected.I have added a test here to reproduce this problem: https://github.com/gdm85/go-iconv/blob/charmap-test/charmap_test.go
You need to initialise submodules on that repo after clone, so:
What did you expect to see?
Conversion happening same as
iconv
does.What did you see instead?
The text was updated successfully, but these errors were encountered: