Wide character in print #22

Closed
szabgab opened this Issue Dec 5, 2011 · 12 comments

Comments

Projects
None yet
7 participants
@szabgab
Contributor

szabgab commented Dec 5, 2011

When there are unicode characters in the Makefile.PL I get the following warning:

Wide character in print at /home/gabor/perl5/lib/perl5/ExtUtils/MakeMaker.pm line 1027.

See https://github.com/datamuc/Pastedance as an example

@schwern

This comment has been minimized.

Show comment Hide comment
@schwern

schwern Dec 6, 2011

Member

Unfortunately, this will not work in 5.6. This is as good a reason as any to kill 5.6. See #5.

Member

schwern commented Dec 6, 2011

Unfortunately, this will not work in 5.6. This is as good a reason as any to kill 5.6. See #5.

@szabgab

This comment has been minimized.

Show comment Hide comment
@szabgab

szabgab Dec 6, 2011

Contributor

I guess this could be solved by a conditional fix of the problem if ($] > 5.008001) { fixed } else { old code } and then it could be removed when you kill 5.6. OTOH I appreciate, but I don't understand why do you make such an effort supporting old versions of Perl.

Contributor

szabgab commented Dec 6, 2011

I guess this could be solved by a conditional fix of the problem if ($] > 5.008001) { fixed } else { old code } and then it could be removed when you kill 5.6. OTOH I appreciate, but I don't understand why do you make such an effort supporting old versions of Perl.

@schwern

This comment has been minimized.

Show comment Hide comment
@schwern

schwern Dec 6, 2011

Member

If MakeMaker (or Test::More) decides to drop a version of Perl, or an operating system, it denies it to everyone. So I go the extra mile... or twenty.

Anyhow, don't worry about it. We're likely to kill 5.6 support before next stable.

Member

schwern commented Dec 6, 2011

If MakeMaker (or Test::More) decides to drop a version of Perl, or an operating system, it denies it to everyone. So I go the extra mile... or twenty.

Anyhow, don't worry about it. We're likely to kill 5.6 support before next stable.

@wchristian

This comment has been minimized.

Show comment Hide comment
@wchristian

wchristian Dec 6, 2011

Member

I'm not sure we need to go that far for this. I just pushed an experimental branch in which i removed the occurances of use utf8; and it still passes all tests and the generated Makefile matches the one generated with all utfes in place:

5cfe22f

I think it might be a bit more useful to detect utf8 being loaded and throw an error asking for it to be removed or us contacted with a good reason as to why it's needed.

Member

wchristian commented Dec 6, 2011

I'm not sure we need to go that far for this. I just pushed an experimental branch in which i removed the occurances of use utf8; and it still passes all tests and the generated Makefile matches the one generated with all utfes in place:

5cfe22f

I think it might be a bit more useful to detect utf8 being loaded and throw an error asking for it to be removed or us contacted with a good reason as to why it's needed.

@schwern

This comment has been minimized.

Show comment Hide comment
@schwern

schwern Dec 6, 2011

Member

@wchristian I doubt it really works without utf8, I think you just hit the limitations of the test. The test doesn't check that the file contents are correct.

As to the idea of asking people why they need utf8... aren't you German? Don't you fellas need those funny characters? :-P

Member

schwern commented Dec 6, 2011

@wchristian I doubt it really works without utf8, I think you just hit the limitations of the test. The test doesn't check that the file contents are correct.

As to the idea of asking people why they need utf8... aren't you German? Don't you fellas need those funny characters? :-P

@wchristian

This comment has been minimized.

Show comment Hide comment
@wchristian

wchristian Dec 6, 2011

Member

@schwern: That's my point.

Note this bit:

the generated Makefile matches the one generated with all utfes in place:

I didn't check the Makefile.PL or just ran the test, i checked that the actual Makefile itself that falls out at the end is the same one (byte-wise) with or without utf8.pm being loaded; and it matched.

I work a lot with things in UTF8 and i honestly find that 99% of the time you want Perl to just treat it as it is and it'll do a good job. I honestly cannot remember any time where "use utf8;" was of any use to me. :)

Also, just in case it wasn't entirely clear: When i said " why it's needed", i was referring to utf8.pm, not utf8 itself.

Member

wchristian commented Dec 6, 2011

@schwern: That's my point.

Note this bit:

the generated Makefile matches the one generated with all utfes in place:

I didn't check the Makefile.PL or just ran the test, i checked that the actual Makefile itself that falls out at the end is the same one (byte-wise) with or without utf8.pm being loaded; and it matched.

I work a lot with things in UTF8 and i honestly find that 99% of the time you want Perl to just treat it as it is and it'll do a good job. I honestly cannot remember any time where "use utf8;" was of any use to me. :)

Also, just in case it wasn't entirely clear: When i said " why it's needed", i was referring to utf8.pm, not utf8 itself.

@ilmari

This comment has been minimized.

Show comment Hide comment
@ilmari

ilmari Mar 6, 2012

Contributor

Failure to encode on output also causes invalid META.yml for those of us with characters between 128 and 255 in our names, see e.g. http://api.metacpan.org/source/ILMARI/MooseX-Types-DateTime-MoreCoercions-0.08/META.yml

Contributor

ilmari commented Mar 6, 2012

Failure to encode on output also causes invalid META.yml for those of us with characters between 128 and 255 in our names, see e.g. http://api.metacpan.org/source/ILMARI/MooseX-Types-DateTime-MoreCoercions-0.08/META.yml

@Leont

This comment has been minimized.

Show comment Hide comment
@Leont

Leont Apr 22, 2013

Member

Bump

Perl Lancaster consensus I think this can be applied.

Member

Leont commented Apr 22, 2013

Bump

Perl Lancaster consensus I think this can be applied.

@dolmen

This comment has been minimized.

Show comment Hide comment
@dolmen

dolmen Jun 5, 2014

Member

See also Moose RT#96246 as Moose's Makefile.PL has non-Latin1 names in AUTHORS.

Member

dolmen commented Jun 5, 2014

See also Moose RT#96246 as Moose's Makefile.PL has non-Latin1 names in AUTHORS.

rurban pushed a commit to rurban/ExtUtils-MakeMaker that referenced this issue Jul 23, 2014

mohawk2 added a commit to mohawk2/ExtUtils-MakeMaker that referenced this issue Jul 28, 2014

@mohawk2

This comment has been minimized.

Show comment Hide comment
@mohawk2

mohawk2 Jul 29, 2014

Member

There is an EUMM RT that can be closed when this is: https://rt.cpan.org/Ticket/Display.html?id=96251

Member

mohawk2 commented Jul 29, 2014

There is an EUMM RT that can be closed when this is: https://rt.cpan.org/Ticket/Display.html?id=96251

bingos added a commit that referenced this issue Jul 30, 2014

Merge pull request #109 from mohawk2/master
Fix Unicode warning from #22 - squashed/rebased commits
@mohawk2

This comment has been minimized.

Show comment Hide comment
@mohawk2

mohawk2 Jul 31, 2014

Member

@szabgab, your code has been merged into the master - any reason not to close this issue? If not, could you close it?

Member

mohawk2 commented Jul 31, 2014

@szabgab, your code has been merged into the master - any reason not to close this issue? If not, could you close it?

@szabgab

This comment has been minimized.

Show comment Hide comment
@szabgab

szabgab Aug 1, 2014

Contributor

thanks

Contributor

szabgab commented Aug 1, 2014

thanks

@szabgab szabgab closed this Aug 1, 2014

vovkasm added a commit to vovkasm/ExtUtils-MakeMaker that referenced this issue Aug 12, 2014

Merge commit '8f393bd6ed756d74a3b6467729099d1a8467462a'
* commit '8f393bd6ed756d74a3b6467729099d1a8467462a': (290 commits)
  Fix regression for older versions of version which are lax
  Make older perls behave the same as modern perls.
  Update bundled CPAN::Meta::Requirements to 2.126
  Revert "Update bundled CPAN::Meta to 2.142060, CPAN::Meta::Requirements to 2.126."
  Leave any "v" start of version, per @dagolden advice.
  Update bundled CPAN::Meta to 2.142060, CPAN::Meta::Requirements to 2.126.
  Use version.pm to parse/normalise versions, in EU::MM::clean_versions.
  Report excerpts of the makefile via note() displayed during verbose testing
  Add a test for various forms of 3-part versions, all of which are presently unsupported
  Remove "running under some shell" - resolve #37.
  link to Dist::Zilla
  link to File::ShareDir::Install and File::ShareDir
  Better scope for a variable
  Liblist::Kid: Handle -l:foo.so invocations properly
  Release engineering for v6.99_07
  fix szabgab/pr23 for 5.6.2
  test and eliminate unicode warning #22
  Release engineering for v6.99_06
  Passes all tests with perl in place-with-space.
  With perl in place-with-space, make Makefile that can make all.
  ...

Conflicts:
	lib/ExtUtils/MM_Unix.pm
	lib/ExtUtils/MakeMaker.pm
	t/lib/MakeMaker/Test/Utils.pm
	t/xs.t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment