[PATCH] Set LC_ALL=C when calling sed in cmd_show
Rémi Lapeyre
remi.lapeyre at lenstra.fr
Mon Mar 30 14:58:29 CEST 2020
> Le 30 mars 2020 à 04:07, Allan Odgaard <lists+pass at simplit.com> a écrit :
>
> On 30 Mar 2020, at 5:05, Rémi Lapeyre wrote:
>
>> In MacOS Catalina sed fails on accents with 'sed: RE error: illegal byte sequence'.
>
> Can you provide steps to reproduce?
➜ password-store git:(98193d3) mkdir -p testdir
➜ password-store git:(98193d3) export PASSWORD_STORE_DIR=$PWD/testdir
➜ password-store git:(98193d3) ./src/password-store.sh init 0B11E80DDD5E5673FA132D6144CCA46F80D1E988
Password store initialized for 0B11E80DDD5E5673FA132D6144CCA46F80D1E988
➜ password-store git:(98193d3) ✗ ./src/password-store.sh generate test/🏠
The generated password for test/🏠 is:
sA[Xa7`W~tog3'I]y<rh5btN9
➜ password-store git:(98193d3) ✗ ./src/password-store.sh show
Password Store
└── test
sed: RE error: illegal byte sequence
➜ password-store git:(98193d3) ✗ g checkout master
La position précédente de HEAD était sur 98193d3 emacs: Drop dependency on f library
Basculement sur la branche 'master'
Votre branche est en avance sur 'origin/master' de 1 commit.
(utilisez "git push" pour publier vos commits locaux)
➜ password-store git:(master) ✗ ./src/password-store.sh show
Password Store
└── test
└── �\237\217�
In my case the issue was with 'Productivite\xcc\x81’ but it’s harder to reproduce with an emoji symbol. It’s possible to bypass the issue by installing gnu-sed on MacOS but it requires to install an external program, to change the PATH, and PassFF still fails when doing that.
This solution is not perfect since as you see, the byte sequence is replaced and not ignored and passed though as is.
There is some occurence of this problem in the archive of the mailing list and you can find more occurence on the web.
More information about the Password-Store
mailing list