| 628 | } |
| 629 | |
| 630 | void String_AppendUtf8(cc_string* value, const void* data, int numBytes) { |
| 631 | const cc_uint8* chars = (const cc_uint8*)data; |
| 632 | int len; cc_codepoint cp; char c; |
| 633 | |
| 634 | for (; numBytes > 0; numBytes -= len) |
| 635 | { |
| 636 | len = Convert_Utf8ToCodepoint(&cp, chars, numBytes); |
| 637 | if (!len) return; |
| 638 | |
| 639 | if (Convert_TryCodepointToCP437(cp, &c)) String_Append(value, c); |
| 640 | chars += len; |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | void String_AppendCP1252(cc_string* value, const void* data, int numBytes) { |
| 645 | const cc_uint8* chars = (const cc_uint8*)data; |
no test coverage detected