From 0a6a117ed323e0b8d8945d8a93afcf8470a249c9 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Thu, 14 Mar 2024 19:37:46 -0700 Subject: [PATCH] Remove remaining uses of ctype, which has locale issues. PiperOrigin-RevId: 615981920 --- src/google/protobuf/io/io_win32.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/google/protobuf/io/io_win32.cc b/src/google/protobuf/io/io_win32.cc index ea43104b95..f39d356ab2 100644 --- a/src/google/protobuf/io/io_win32.cc +++ b/src/google/protobuf/io/io_win32.cc @@ -28,14 +28,12 @@ #include "google/protobuf/io/io_win32.h" -#include #include #include #include #include #include #include -#include #include "absl/strings/ascii.h" @@ -71,7 +69,9 @@ struct CharTraits { template <> struct CharTraits { - static bool is_alpha(wchar_t ch) { return iswalpha(ch); } + static bool is_alpha(wchar_t ch) { + return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); + } }; template