Description of problem: /usr/lib/rpm/rpm2cpio.sh fails on zh_TW locale (and probably other non-Latin locales) Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. install and log in as zh_TW. It has the following environment LC_PAPER=zh_TW.UTF-8 LC_ADDRESS=zh_TW.UTF-8 LC_MONETARY=zh_TW.UTF-8 LC_NUMERIC=zh_TW.UTF-8 LC_TELEPHONE=zh_TW.UTF-8 LC_MESSAGES=zh_TW.UTF-8 LC_COLLATE=zh_TW.UTF-8 LC_IDENTIFICATION=zh_TW.UTF-8 LANG=zh_TW.UTF-8 LC_MEASUREMENT=zh_TW.UTF-8 LANGUAGE=zh_TW.Big5:zh_TW:zh_HK:zh LC_CTYPE=zh_TW.UTF-8 LC_TIME=zh_TW.UTF-8 LC_NAME=zh_TW.UTF-8 Run rpm2cpio.sh against an rpm and you get [joe@big-apple ~]$ /usr/lib/rpm/rpm2cpio.sh lib64lua5.2-5.2.3-3.mga5.x86_64.rpm Unrecognized rpm file: lib64lua5.2-5.2.3-3.mga5.x86_64.rpm Setting "export LC_ALL=C" makes this work. The issue appears to be that setting LC_ALL causes printf to behave differently on non-Roman locales Reproducible: Steps to Reproduce:
I can try later but can you run those commands? echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }' | od -x echo . | awk '{ printf("%cLZ", 0xff); }' | od -x echo . | awk '{ printf("%c7z", 0xfd); }' | od -x I would tend to blame Big5 :)
CC: (none) => pterjan
So I was wrong: $ echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }' | od -x 0000000 8b1f 0000002 $ echo . | LANG=zh_TW.UTF-8 awk '{ printf("%c%c", 0x1f, 0x8b); }' | od -x 0000000 c21f 008b 0000003
CC: (none) => thierry.vignaudAssignee: bugsquad => thierry.vignaud
Whiteboard: (none) => MGA5TOO
Actually there was a fix for it upstream in 2012: https://bugzilla.redhat.com/show_bug.cgi?id=878363 But it's still broken on mga (though it works on FC24, but with different versions of glibc & gawk). Its' broken for ar, br, el, fr, pl, zh_TW now...
Created attachment 8577 [details] fix rpm2cpio.sh This patch fixes it for me Alternatively, using the upstream refactoring works as fine: http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=19dbaff8dd051688c0acf1b6605bf13a7fe019bd
Fixed in SVN
Status: NEW => RESOLVEDResolution: (none) => FIXED