普通网友 2014-08-04 08:11
浏览 75
已采纳

go.text中的go iso-8859-1编码支持

I use go.text in my project https://godoc.org/code.google.com/p/go.text/encoding

I do not understand why it is missing iso-8859-1?

I know I can easily transcode it byte -> rune -> utf8 Unmarshal an ISO-8859-1 XML input in Go

But I wonder if there is some encoding in go.text that is iso-8859-1 but named differently. I know it has following names.

    ISO_8859-1:1987
    ISO-8859-1
    iso-ir-100
    ISO_8859-1
    latin1
    l1
    IBM819
    CP819
    csISOLatin1
  • 写回答

1条回答 默认 最新

  • dongpu1879 2014-08-04 10:11
    关注

    You can use Windows1252 in place of iso-8859-1.

    This character encoding is a superset of ISO 8859-1, but differs from the IANA's ISO-8859-1 by using displayable characters rather than control characters in the 80 to 9F (hex) range

    http://en.wikipedia.org/wiki/Windows-1252

    ISO-8859-1 assigns several control codes in this range. Windows-1252 has several characters, punctuation, arithmetic and business symbols assigned to these code points.

    There is a chart with the differences here:

    http://www.i18nqa.com/debug/table-iso8859-1-vs-windows-1252.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部