"stash pull-request" does not support commit messages with utf8 (Japanese) characters

Issue #25 open
David Scripps created an issue

To reproduce:

git commit -m "日本語のテキスト"
git push origin HEAD
stash pull-request master

Expected result: pull request is created

Actual result:

error: "\xE5" on US-ASCII. Use --trace to view backtrace

Running --trace reveals the following:

/.rvm/gems/ruby-2.0.0-p353/gems/atlassian-stash-0.4.1/lib/atlassian/stash/pull_request.rb:94:in `encode': "\xE5" on US-ASCII (Encoding::InvalidByteSequenceError)
    from /.rvm/gems/ruby-2.0.0-p353/gems/atlassian-stash-0.4.1/lib/atlassian/stash/pull_request.rb:94:in `to_json'
    from /.rvm/gems/ruby-2.0.0-p353/gems/atlassian-stash-0.4.1/lib/atlassian/stash/pull_request.rb:94:in `create_pull_request'
    from /.rvm/gems/ruby-2.0.0-p353/gems/atlassian-stash-0.4.1/bin/stash:137:in `block (3 levels) in <top (required)>'
    from /.rvm/gems/ruby-2.0.0-p353/gems/atlassian-stash-0.4.1/lib/atlassian/stash/git.rb:44:in `ensure_within_git!'
    from /.rvm/gems/ruby-2.0.0-p353/gems/atlassian-stash-0.4.1/bin/stash:135:in `block (2 levels) in <top (required)>'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/command.rb:180:in `call'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/command.rb:180:in `call'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/command.rb:155:in `run'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/runner.rb:422:in `run_active_command'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/runner.rb:82:in `run!'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
    from /.rvm/gems/ruby-2.0.0-p353/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'

Comments (2)

  1. Log in to comment