-/* RN - the "not use sizeof() thing is really annoying!" */
-#if wxUSE_UNICODE
-# define CHRBITS 32
-#else
-# define CHRBITS 8 /* bits in a chr; must not use sizeof */
-#endif
-#define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
-/*
- PUTTING PARENTHASES AROUND THIS, I.E. (1 << CHRBITS) WILL
- CAUSE ALL CHARACTERS TO BE MATCHED!!!
-*/
-#define CHR_MAX 1 << CHRBITS /*0xfffffffe*/ /* CHR_MAX-CHR_MIN+1 should fit in uchr */
-
+#if wxUSE_WCHAR_T
+# define CHRBITS (SIZEOF_WCHAR_T << 3) /* bits in a chr; must not use sizeof */
+# define CHR_MAX ((1 << CHRBITS) - 1)
+# define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
+#else /*ANSI*/
+# define CHRBITS 8
+# define CHR_MAX 0xFF
+# define CHR_MIN 0x00
+#endif /*wxUSE_WCHAR_T*/