* Fills the provided buffer with two bytes such that: * pg_encoding_mblen(dst) == 2 && pg_encoding_verifymbstr(dst) == 0 */
| 1897 | * pg_encoding_mblen(dst) == 2 && pg_encoding_verifymbstr(dst) == 0 |
| 1898 | */ |
| 1899 | void |
| 1900 | pg_encoding_set_invalid(int encoding, char *dst) |
| 1901 | { |
| 1902 | Assert(pg_encoding_max_length(encoding) > 1); |
| 1903 | |
| 1904 | dst[0] = (encoding == PG_UTF8 ? 0xc0 : NONUTF8_INVALID_BYTE0); |
| 1905 | dst[1] = NONUTF8_INVALID_BYTE1; |
| 1906 | } |
| 1907 | |
| 1908 | /* |
| 1909 | *------------------------------------------------------------------- |