From d084585f01b57727a5778f2f6723b89c6d98a9d4 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 13 Jul 2022 11:54:08 +0200 Subject: Rename ENCINDEX_ASCII to ENCINDEX_ASCII_8BIT Otherwise it's way too easy to confuse it with US_ASCII. --- win32/win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/win32.c b/win32/win32.c index 607603cf04..bf3d058171 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2310,7 +2310,7 @@ rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc) WideCharToMultiByte(CP_UTF8, 0, wstr, clen, RSTRING_PTR(src), len, NULL, NULL); } switch (encindex) { - case ENCINDEX_ASCII: + case ENCINDEX_ASCII_8BIT: case ENCINDEX_US_ASCII: /* assume UTF-8 */ case ENCINDEX_UTF_8: @@ -2402,7 +2402,7 @@ struct direct * rb_w32_readdir(DIR *dirp, rb_encoding *enc) { int idx = rb_enc_to_index(enc); - if (idx == ENCINDEX_ASCII) { + if (idx == ENCINDEX_ASCII_8BIT) { const UINT cp = filecp(); return readdir_internal(dirp, win32_direct_conv, &cp); } @@ -7355,7 +7355,7 @@ rb_w32_write_console(uintptr_t strarg, int fd) ECONV_INVALID_REPLACE|ECONV_UNDEF_REPLACE, Qnil); /* fall through */ case ENCINDEX_US_ASCII: - case ENCINDEX_ASCII: + case ENCINDEX_ASCII_8BIT: /* assume UTF-8 */ case ENCINDEX_UTF_8: ptr = wbuffer = mbstr_to_wstr(CP_UTF8, RSTRING_PTR(str), RSTRING_LEN(str), &len); -- cgit v1.2.3