Possible Unicode Problems in Busybox - Collect and Discussion

Harald Becker ralda at gmx.de
Wed Aug 13 17:34:43 UTC 2014


Hi Denys !

>> 2) shell substitution ${#var}
>> Does this length operation shall give the number of bytes in var or the
>> number of characters (which may differ for multi byte characters, like
>> UTF-8).
>
> bash gives number of Unicode chars.
> I just fixed both ash and hush to do the same.

Add a big warning in release notes, I ought this is a shell script 
breaker. Shell scripts which rely on getting the number of bytes may now 
fail, because they allocate space or copy less characters.

--
Harald



More information about the busybox mailing list