Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string Int2Uni(integer i)
- // Totally works with mono. Does NOT work with LSLeditor.
- // Can't be 0. Should be in UTF-16 range. No error checking.
- // Only works in the 0x0001 thru 0xD7FF range (UTF-16 compatibility).
- {
- if (i < 0x80) return llUnescapeURL("%" + Byte2Hex(i));
- if (i < 0x800) return llUnescapeURL("%" + Byte2Hex((i >> 6) | 0x3FC0) + "%" + Byte2Hex((i | 0x80) & 0xBF));
- return llUnescapeURL("%" + Byte2Hex((i >> 12) | 0x1FE0) + "%" + Byte2Hex(((i >> 6 ) | 0x80) & 0xBF) + "%" + Byte2Hex(((i | 0x80) & 0xBF)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement