Closed (works as designed)
Project:
Entity tree
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2011 at 23:47 UTC
Updated:
10 Oct 2011 at 05:39 UTC
while ( (ord($encoding[$n - $length]) & 0xC0) != 0xC0);
Should'nt it be :
while ( (ord($encoding[$n - $length]) & 0xC0) != 0x80);
Comments
Comment #1
chx commentedNo, the first UTF8 byte always has the two topmost bits flipped. It would be == 0x80 if you want to do that but honestly isnt this more readable?