use utf8; use Test::More; use Test2::Plugin::UTF8; use Devel::Peek; use Encode; use File::Find::Rule; # the file's 1st letter is greek kappa, # 2nd letter is iota accented (with tonos) my $expected = 'test/κί.png'; my @gots = map { Encode::decode_utf8($_) } File::Find::Rule->file()->name(qr/.*\.png/)->in('test') ; is(scalar(@gots), 1, "got 1 item"); is($gots[0], $expected, "name is as expected"); Dump($expected); Dump($gots[0]); done_testing(); #### FLAGS = (POK,IsCOW,pPOK,UTF8) PV = 0x561260048d00 "test/\xCE\xBA\xCE\xAF.png"\0 [UTF8 "test/\x{3ba}\x{3af}.png"] CUR = 13 LEN = 15 FLAGS = (POK,IsCOW,pPOK,UTF8) PV = 0x561260249060 "test/\xCE\xBA\xCE\xAF.png"\0 [UTF8 "test/\x{3ba}\x{3af}.png"] CUR = 13 LEN = 15 #### FLAGS = (POK,IsCOW,pPOK,UTF8) PV = 0x7fd35e7d8b60 "test/\316\272\316\257.png"\0 [UTF8 "test/\x{3ba}\x{3af}.png"] CUR = 13 LEN = 15 FLAGS = (POK,IsCOW,pPOK,UTF8) PV = 0x7fd35e7ee4e0 "test/\316\272\316\271\314\201.png"\0 [UTF8 "test/\x{3ba}\x{3b9}\x{301}.png"] CUR = 15 LEN = 17 #### OSX: PV = 0x7f8724885690 "test/\316\272\316\271\314\201.png"\0 <<<< separate accent Linux: PV = 0x5566b6bc05d0 "test/\xCE\xBA\xCE\xAF.png"\0