develooper Front page | perl.par | Postings from August 2018

[rt.cpan.org #126280] 90-rt122949.t fails when "Use Unicode UTF-8for worldwide language support" is enabled

Thread Previous
From:
Tomasz Konojacki via RT
Date:
August 15, 2018 23:57
Subject:
[rt.cpan.org #126280] 90-rt122949.t fails when "Use Unicode UTF-8for worldwide language support" is enabled
Message ID:
rt-4.0.18-12326-1534377417-626.126280-15-0@rt.cpan.org
Wed Aug 15 19:56:57 2018: Request 126280 was acted upon.
Transaction: Ticket created by XENU
       Queue: PAR-Packer
     Subject: 90-rt122949.t fails when "Use Unicode UTF-8 for worldwide
 language support" is enabled
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: XENU@cpan.org
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=126280 >


Windows 10 has recently introduced a new feature - "Use Unicode UTF-8 for worldwide language support" checkbox in Region Settings. Enabling it globally changes codepage to 65001 and makes everything use UTF-8.

When this checkbox is enabled, 90-rt122949.t fails in the following way:

ok 110 - successfully ran "C:\Users\xenu\AppData\Local\Temp\CKZfGeKF8p\packed.exe ab"
not ok 111
#   Failed test at t/90-rt122949.t line 77.
#          got: '$VAR1 = [
#   "a\357\277\275b"
# ];
# '
#     expected: '$VAR1 = [
#   "a\205b"
# ];
# '
# Looks like you failed 1 test of 111.

"\357\277\275" is a REPLACEMENT CHARACTER. It seems that when the UTF-8 checkbox is enabled, bytes that aren't valid UTF-8 are being replaced with that character. "\x{85}" obviously isn't a valid UTF-8 character.

I think that the failing testcase should either be removed or replaced with something that is valid UTF-8.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About