We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
text/encoding/japanese.ShiftJIS explain it can handle cp932 in doc. https://github.com/golang/text/blob/master/encoding/japanese/shiftjis.go#L17-L18
But below's code doesn't work because the range of lead-byte is range of ShiftJIS not cp932.
package main import ( "golang.org/x/text/encoding/japanese" "golang.org/x/text/transform" "log" ) func main() { // 髙(FBFC) s, _, err := transform.String(japanese.ShiftJIS.NewDecoder(), "\xFB\xFC") if err != nil { log.Fatal(err.Error()) } log.Print(s) // 﨑(FAB1) s, _, err = transform.String(japanese.ShiftJIS.NewDecoder(), "\xFA\xB1") if err != nil { log.Fatal(err.Error()) } log.Print(s) }
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/18116 mentions this issue.
Sorry, something went wrong.
I'm thinking this should be contained in 1.6 .
@minux ah, fair enough. thank you.
golang/text@c20b6f2
No branches or pull requests
text/encoding/japanese.ShiftJIS explain it can handle cp932 in doc.
https://github.com/golang/text/blob/master/encoding/japanese/shiftjis.go#L17-L18
But below's code doesn't work because the range of lead-byte is range of ShiftJIS not cp932.
The text was updated successfully, but these errors were encountered: