summaryrefslogtreecommitdiff
path: root/win32/win32.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-31 20:19:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-31 20:19:34 +0000
commitd41ff1b8ad987cfcb928deba4254681c1a4c0e36 (patch)
tree1fe5e3007d4c0adad93b501f54394bf383983d52 /win32/win32.h
parent426c1a18afb84430666a6b4f0111dbc3205bd349 (diff)
downloadperl-d41ff1b8ad987cfcb928deba4254681c1a4c0e36.tar.gz
introduce $^U, a global bit to indicate whether system
calls should using widechar APIs; chr and sprintf "%c" also follow this flag in the absense of "use byte"; "use utf8" sets $^U=1 (this appears kludgey) p4raw-id: //depot/perl@4937
Diffstat (limited to 'win32/win32.h')
-rw-r--r--win32/win32.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/win32/win32.h b/win32/win32.h
index 69a4caf063..4fed26a911 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -422,12 +422,14 @@ struct interp_intern {
/* Use CP_UTF8 when mode is UTF8 */
#define A2WHELPER(lpa, lpw, nBytes)\
- lpw[0] = 0, MultiByteToWideChar((IN_UTF8) ? CP_UTF8 : CP_ACP, 0, lpa, -1, lpw, (nBytes/sizeof(WCHAR)))
+ lpw[0] = 0, MultiByteToWideChar((IN_BYTE) ? CP_ACP : CP_UTF8, 0, \
+ lpa, -1, lpw, (nBytes/sizeof(WCHAR)))
#define W2AHELPER(lpw, lpa, nChars)\
- lpa[0] = '\0', WideCharToMultiByte((IN_UTF8) ? CP_UTF8 : CP_ACP, 0, lpw, -1, (LPSTR)lpa, nChars, NULL, NULL)
+ lpa[0] = '\0', WideCharToMultiByte((IN_BYTE) ? CP_ACP : CP_UTF8, 0, \
+ lpw, -1, (LPSTR)lpa, nChars, NULL, NULL)
-#define USING_WIDE() (PerlEnv_os_id() == VER_PLATFORM_WIN32_NT)
+#define USING_WIDE() (PL_bigchar && PerlEnv_os_id() == VER_PLATFORM_WIN32_NT)
#ifdef USE_ITHREADS
# define PERL_WAIT_FOR_CHILDREN \