Ulf Zibis a écrit :
char's ARE ALWAYS unsigned. :-)
my apologies :)
ok, read a mail twice before hitting the reply button :)

Rémi


Am 26.06.2008 12:31, Rémi Forax schrieb:
Ulf Zibis a écrit :
Also I've found out, that MASK1 is superfluous, because on implicit converting from char to int all upper bits are automaticlly 0.
No, all upper bits are the value of the sign bit, you can remove the mask only if
you use unsigned values.
So we can code instead:

char c = c2bMap.charAt(c2bMapIndex[current >> SHIFT] + (current & MASK));

          char c = (current < '\u0100') ? c2bMap.charAt(current) :
c2bMap.charAt(c2bMapIndex[current >> SHIFT] + (current & MASK));
Rémi




Reply via email to