Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Wide character in print #22

Closed
szabgab opened this Issue · 12 comments

7 participants

@szabgab

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
Owner

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

@szabgab

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
Owner

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
Collaborator

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
Owner

@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
Collaborator

@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

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
Owner

Bump

Perl Lancaster consensus I think this can be applied.

@dolmen
Collaborator

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

@rurban rurban referenced this issue from a commit in rurban/ExtUtils-MakeMaker
@szabgab szabgab test and eliminate unicode warning #22 9433d53
@mohawk2 mohawk2 referenced this issue from a commit in mohawk2/ExtUtils-MakeMaker
@szabgab szabgab test and eliminate unicode warning #22 8d3b79b
@mohawk2
Collaborator

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

@mohawk2
Collaborator

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

@szabgab

thanks

@szabgab szabgab closed this
@vovkasm vovkasm referenced this issue from a commit in vovkasm/ExtUtils-MakeMaker
@vovkasm vovkasm 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
ae6cd96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.