Skip to content

A problem when converting jis-string to utf-8 #1

Description

@horasal

In this call
mahonia.NewDecoder("shift-jis").ConvertString(string(s))

if string(s) contain char "", it will be converted to "¥"( full-width), which may lead to an error when creating file.

The following code can avoid this problem without changing original package
strings.Replace(mahonia.NewDecoder("shift-jis").ConvertString(string(s)), "¥", "", -1)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions