| 223 | } |
| 224 | |
| 225 | inline int EncodeUnicodePointToUTF16Reversed(unsigned short * buffer, int codePoint) |
| 226 | { |
| 227 | int count = 0; |
| 228 | if (codePoint <= 0xD7FF || (codePoint >= 0xE000 && codePoint <= 0xFFFF)) |
| 229 | buffer[count++] = ReverseBitOrder((unsigned short)codePoint); |
| 230 | else |
| 231 | { |
| 232 | int sub = codePoint - 0x10000; |
| 233 | int high = (sub >> 10) + 0xD800; |
| 234 | int low = (sub & 0x3FF) + 0xDC00; |
| 235 | buffer[count++] = ReverseBitOrder((unsigned short)high); |
| 236 | buffer[count++] = ReverseBitOrder((unsigned short)low); |
| 237 | } |
| 238 | return count; |
| 239 | } |
| 240 | |
| 241 | class Encoding |
| 242 | { |
no test coverage detected