Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with '\udc00'

 
Ilaria Ballamuti
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
the following piece of code gives me unespected results
char[] c = {'\udc00'};
charArray = new String(c);
System.out.println(charArray.length());
System.out.println(charArray.getBytes().length);
The first print gives me 1, the second 0.
Could you please explain me the reason ?
Thanx in advance
Ilaria
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!