Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Git CPAN distribution.

Report information
The Basics
Id: 90537
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Git

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.017
Fixed in: 2.019



Subject: wide character in print with ::Commit

I've only just noticed this, not sure how long its been happening.

Basically, I have UTF-8 Characters in my Changelog, and so this line gives a warning:

Wide character in print at /home/kent/perl5/perlbrew/perls/perl-5.19.5/lib/site_perl/5.19.5/Dist/Zilla/Plugin/Git/Commit.pm line 87.

https://metacpan.org/source/CJM/Dist-Zilla-Plugin-Git-2.017/lib/Dist/Zilla/Plugin/Git/Commit.pm#L87

Though I haven't exactly worked out how to get the right value for that string.

 

The code I'd imagine would have to be somewhere after _get_changes, because it transiently munges content.  But the content is still utf8 after munging, so you may have to clone the file in memory, stuff the munged content in it, and then ask the file for encoded_content to spew into the git commit message.

Or something along those lines.

I think all we want is to insert before line 87: binmode $fh, ':utf8' if Dist::Zilla->VERSION >= 5; on the assumption that Git commit messages should be UTF-8. Does that solve your problem?

On 2013-11-20 18:18:22, CJM wrote:
> I think all we want is to insert before line 87:
>
> binmode $fh, ':utf8' if Dist::Zilla->VERSION >= 5;
>
> on the assumption that Git commit messages should be UTF-8.
>
> Does that solve your problem?

That approach should work for me, just not sure if its the "right" approach or not.

Though, I guess it makes sense, because content is characters, and instead of having to work out what encoding it should be stored as, we're deciding git needs it in UTF8, so that works for me.

Released as 2.019