Hi list!
Is there a better way in Java to get the length in bytes of an UTF-8
sequence of a string, than to just convert it to a byte array and check
the arrays length? I have to validate JIDs which are only allowed to
have 1023 byte UTF-8 strings for each portion. I have not found an
elegant way to do this in Java as length of the string returns the
number of characters in a string and not the number of bytes in its
UTF-8 representation.
Tot kijk
Matthias
--
Fon: +49-(0)70 0770 07770 http://web.amessage.info
HAM: DB1MW xmpp:[EMAIL PROTECTED]
signature.asc
Description: Digital signature
_______________________________________________ jdev mailing list [EMAIL PROTECTED] https://jabberstudio.org/mailman/listinfo/jdev
