chenxiaolong / DualBootPatcher

Patches Android ROMs for dual boot support
https://dbp.noobdev.io
Other
527 stars 466 forks source link

mbtool: Fix setlocale call now that bionic libc has basic locale support #1348

Closed chenxiaolong closed 5 years ago

chenxiaolong commented 5 years ago

Android's bionic libc now respects setlocale(), so mbtool's previous setlocale(LC_ALL, "C") call prevented UTF-8 encodings from working when creating or extracting backups. The locale argument has been changed to "" so that the encoding specified by the standard environment variables is used instead. If the environment variables are unset, bionic defaults to UTF-8.

This PR also adds a test to ensure that this doesn't break in the future.

Fixes #1265