Ash busybox string management issue

look like ash is managing strings as byte sequences instead of char sequences.
This is revealed by mananipilating utf8 coded strings
as an exemple:
echo "var1=$var1 length is ${#var1}"
echo "second char=${var1:2:1}"
Aé€ length is 6
Which obviously is wrong
in fact when coded utf8 A is 0x41h, é is 0xC3A9h and € is 0xE282AC
look like ash donnot pay attention to char coding as some other shell do (bash for example)
Any solution to resolve the issue?

what is encoding

opkg list | grep '^kmod-nls'

kmod-nls-base - 4.14.167-1

Probably BusyBox shell is not a suitable tool to process Unicode strings, at least by default:

1 Like

Not clear at all because echoing and printing of utf8 encoded message works well
Look like part of the job is done

Ash shell is a part of the BusyBox package.
Most likely, its functionality is stripped down by the listed compilation flags.
If you want to proceed, rebuild the BusyBox package with those flags enabled.