Tue Dec 27 01:31:33 2011: Request 73491 was acted upon. Transaction: Ticket created by gyp...@gmail.com Queue: PAR-Packer Subject: cache directory naming problem Broken in: 1.012 Severity: (no value) Owner: Nobody Requestors: gyp...@gmail.com Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73491 >
Hello, I'm using: * MS Windows XP ServicePack3 32bit * Strawberry Perl 5.12.3 * PAR::Packer 1.012 I made a simple Perl script, and made a .exe file using pp -o app.exe app.pl This app.exe works very well when the username(of windows system) is in English. However, it happens to fail to create a cache directory if the username is a sort of string of Korean characters. I attached the screenshot, hoping it would be helpful to you. I looked into the error message and I found that the original username is changed to be an illegal byte sequence: * from 0x ba ce be fb c0 cc (3character, 6bytes, encoded with cp949) * to 0x ba ce be 5f c0 cc I guess this is because the following code in SetupTemp.pm: $username =~ s/\W/_/g; or, equivalent C-code in mktmpdir.c: /* replace all non-alphanumeric letters with '_' */ for ( c = username ; *c != '\0' ; c++ ) { if ( !isalnum(*c) ) { *c = '_'; } } doesn't consider Non-latin characters. Would you please check it? I think that it would be good idea to use "%- encoding" for all non-latin characters, so that the username in the screenshot would be changed into "par-%ba%ce%be%fb%c0%cc". ('%' may be removed) One other idea is to replace 'every bytes in non-ascii range' with '_', but this may change many different non-latin usernames of same length to same string, eg. "______". Thank you for this good module. Sincerly, Geunyoung Park from South Korea P.S. This problem is issued initialy in a Korean perl user community by "@owl0908", not me. His original blog post is here (written in Korean): http://www.dormouse.pe.kr/blogtool/article/410/
<<inline: packer.png>>