equal
deleted
inserted
replaced
212 */ |
212 */ |
213 size_t Utf8Decode(WChar *c, const char *s) |
213 size_t Utf8Decode(WChar *c, const char *s) |
214 { |
214 { |
215 assert(c != NULL); |
215 assert(c != NULL); |
216 |
216 |
217 if (!HASBIT(s[0], 7)) { |
217 if (!HasBit(s[0], 7)) { |
218 /* Single byte character: 0xxxxxxx */ |
218 /* Single byte character: 0xxxxxxx */ |
219 *c = s[0]; |
219 *c = s[0]; |
220 return 1; |
220 return 1; |
221 } else if (GB(s[0], 5, 3) == 6) { |
221 } else if (GB(s[0], 5, 3) == 6) { |
222 if (IsUtf8Part(s[1])) { |
222 if (IsUtf8Part(s[1])) { |