How to substring by bytes
807589Sep 7 2008 — edited Sep 7 2008Hi,
I need to save strings in different langauges in the DB, up to 24 bytes.
How can i substring by bytes in java?
for example:
Èçðàèëü - is 14 bytes, but the string length is 7
hhhhhhh - is 7 bytes and the string length is 7.
i would like to cut it by bytes - up to 7 bytes.
if i use substring method, i get 14 bytes for the Russian letters!
how can i do it?
Thanks!