204 printf(
"/* Autogenerated file. Update cp_enc_map_gen.c and regen like \n"
205 " cp_enc_map_gen.exe > cp_enc_map.c \n*/\n\n");
206 printf(
"static const struct php_win32_cp php_win32_cp_map[] = {");
211 while (rnd <= 2 && ++rnd && (cur = &cp_map[0]))
214 if (!IsValidCodePage(cur->
id)) {
218 printf(
"\t/* %u is invalid */\n", cur->
id);
220 }
else if (GetCPInfoEx(cur->
id, 0, &info)) {
221 DWORD to_w_fl = 0, from_w_fl = 0;
223 if (65001U == cur->
id || 54936U == cur->
id) {
224 from_w_fl = WC_ERR_INVALID_CHARS;
225 to_w_fl = MB_ERR_INVALID_CHARS;
234 printf(
"\t{ %u, %u, %u, %u, \"%s\", NULL, \"%s\" },\n", info.CodePage, to_w_fl, from_w_fl, info.MaxCharSize, cur->
name, info.CodePageName);
239 printf(
"\t{ %u, %u, %u, %u, \"%s\", \"%s\", \"%s\" },\n", info.CodePage, to_w_fl, from_w_fl, info.MaxCharSize, cur->
name, cur->
enc, info.CodePageName);