"auto" is only meaningful in functions which accept an encoding
*list* and support encoding detection. These functions have
explicit checks for "auto". It cannot be used as a standalone
encoding in any meaningful capacity, so I'm dropping it entirely.
#endif
-static const char *mbfl_encoding_auto_aliases[] = {"unknown", NULL};
-
-static const mbfl_encoding mbfl_encoding_auto = {
- mbfl_no_encoding_auto,
- "auto",
- NULL,
- (const char *(*)[])&mbfl_encoding_auto_aliases,
- NULL,
- 0,
- NULL,
- NULL
-};
-
static const mbfl_encoding *mbfl_encoding_ptr_list[] = {
&mbfl_encoding_pass,
- &mbfl_encoding_auto,
&mbfl_encoding_wchar,
&mbfl_encoding_byte2be,
&mbfl_encoding_byte2le,
enum mbfl_no_encoding {
mbfl_no_encoding_invalid = -1,
mbfl_no_encoding_pass,
- mbfl_no_encoding_auto,
mbfl_no_encoding_wchar,
mbfl_no_encoding_byte2be,
mbfl_no_encoding_byte2le,
var_dump(mb_preferred_mime_name('BAD_NAME'));
// No preferred name
-var_dump(mb_preferred_mime_name('auto'));
+var_dump(mb_preferred_mime_name('pass'));
?>
--EXPECTF--
Shift_JIS
Warning: mb_preferred_mime_name(): Unknown encoding "BAD_NAME" in %s on line %d
bool(false)
-Warning: mb_preferred_mime_name(): No MIME preferred name corresponding to "auto" in %s on line %d
+Warning: mb_preferred_mime_name(): No MIME preferred name corresponding to "pass" in %s on line %d
bool(false)