Skip to content
New issue

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

x/text/encoding/japanese: iso2022jp doesn't write kanji-out #11463

Closed
mattn opened this issue Jun 29, 2015 · 3 comments
Closed

x/text/encoding/japanese: iso2022jp doesn't write kanji-out #11463

mattn opened this issue Jun 29, 2015 · 3 comments

Comments

@mattn
Copy link
Member

mattn commented Jun 29, 2015

r := transform.NewReader(strings.NewReader("テスト"), japanese.ISO2022JP.NewEncoder())
jis7, err := ioutil.ReadAll(r)

The encoder doesn't write KANJI-OUT (mean ASCII-IN). When using this encoder for mail subject, subject become:

=?ISO-2022-JP?B?GyRCJUYlOSVI?=

But this should be:

=?ISO-2022-JP?B?GyRCJUYlOSVIGyhC?=

Some japanese older mobile phones doesn't work with go's encoder.

cc @nigeltao

@mattn
Copy link
Member Author

mattn commented Jun 30, 2015

@mattn
Copy link
Member Author

mattn commented Jul 1, 2015

Could you please take a look?

@mattn
Copy link
Member Author

mattn commented Jul 2, 2015

Closed by golang/text@10e37ec
Sorry, I specified wrong issue number. it should be golang/go#11463.

@mattn mattn closed this as completed Jul 2, 2015
@mikioh mikioh changed the title encoding/japanese/iso2022jp doesn't write kanji-out x/text/encoding/japanese: iso2022jp doesn't write kanji-out Jul 2, 2015
@golang golang locked and limited conversation to collaborators Jul 1, 2016
AlexanderYastrebov pushed a commit to AlexanderYastrebov/go that referenced this issue Oct 3, 2021
Fixes golang#11463

Change-Id: Id84b6237a08f2fbdac0a1cd4481f1b0126de426a
Reviewed-on: https://go-review.googlesource.com/11665
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants