Fix Unicode $HOME dir
I have Unicode home dir /home/Dāvis
and XDG_CONFIG_HOME
is set to /home/Dāvis/.config
.
I'm using LANG=lv_LV.UTF-8
so everything is in UTF-8 and works unless people try cast things to latin1
which is wrong
So fix that by correctly using fromLocal8Bit
, this will work even for non-UTF8 encodings.
Without this MR, it would fail with
createStorageDir Could not create storage directory: "/home/DÄ\u0081vis/.config/signond"
init Failed to create storage directory.
initStorage CAM initialization failed
init Signond: Cannot initialize credentials storage.