Skip to content

Not support Chinese character #295

@zesming

Description

@zesming

I usually get some mojibake if the output information (e.g. g.log.first.author.name) contains some Chinese character, just like '������' .

If I annotate the encoding code (lib.rb line 826 to 866), output would be correct (ruby 2.2.3).

  def command_lines(cmd, opts = [], chdir = true, redirect = '')
      cmd_op = command(cmd, opts, chdir)
    #   op = cmd_op.encode("UTF-8", "binary", {
      #     :invalid => :replace,
        # :undef => :replace
      # })
      cmd_op.split("\n")
  end

I have found an issue and a pull request to add this implementation. Does it a good choice to convert UTF-8 manually?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions