Bug 508105 - Error evaluating expressions with multibyte characters

Don't use String.getBytes() and use indices from that array to call
String.getCharAt(). If text contains multibyte characters, the length of
the byte array will be higher as the number of characters, so the code
will fail with StringIndexOutOfBoundsException sooner or later.

Change-Id: Id68a7bec339c2076a2d291291a3d104c65021f69
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2 files changed