encoding: add minor fixes and workarounds
encoding: add minor fixes and workarounds

* util (ble/encoding:UTF-8/b2c): fix interpretation of leading byte
* util (ble/util/s2c): work around intermediate mbstate of bash <= 5.2
* util (ble/util/s2bytes): clear locale cache

akinomyoga/ble.sh,akinomyoga/ble.sh,akinomyoga/ble.sh,akinomyoga/ble.sh