Opps, the solution is already posted
But really I see here one problem ...
The problem is that now one java "char" isn't one UNICODE character,
exist some characters that represented as two java 'char'
Previously java char was UNICODE character, now it's UTF-16 representation
of 22 bits (?) UNICODE character.
(See also:
documentation java 1.5 java.lang.Character surrogate char.)
and
http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF So if string was char[3] = { A B1 B2 }
after reversing: B2 B1 A ,that is wrong.
Where B UNICODE character is represented as two 16 bits java char: B1, B2
[ March 01, 2004: Message edited by: Igor Ko ]