linzhengen / tech-notes

My tech notes write in github issues🧲
1 stars 0 forks source link

[20210615] golang の `windows-31j == shift_jis`?!!! #111

Open linzhengen opened 3 years ago

linzhengen commented 3 years ago

厳密にいうと windows-31jはshift_jisの拡張、shift_jisではないが、 golangのencodingの実装では、等しいなのか

https://github.com/golang/text/blob/3115f89c4b99a620c7f1a4395a2b4405e95b82b6/encoding/japanese/shiftjis.go#L16-L18

// ShiftJIS is the Shift JIS encoding, also known as Code Page 932 and
// Windows-31J.
var ShiftJIS encoding.Encoding = &shiftJIS