summaryrefslogtreecommitdiff
path: root/cygwin
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-24 16:43:59 -0700
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:55:56 -0600
commitc80e42f3bedc86f49112644858de416b7d06c09a (patch)
tree0111a70b6c07fdde8d9094fa5ca27f4efe0d003f /cygwin
parente66b99e978ba46660c4591770f7c1998ea490c2d (diff)
downloadperl-c80e42f3bedc86f49112644858de416b7d06c09a.tar.gz
Convert some uvuni() to uvchr()
All the tables are now based on the native character set, so using uvuni() in almost all cases is wrong.
Diffstat (limited to 'cygwin')
-rw-r--r--cygwin/cygwin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c
index 87401d1dab..e7be5e3232 100644
--- a/cygwin/cygwin.c
+++ b/cygwin/cygwin.c
@@ -156,7 +156,7 @@ wide_to_utf8(const wchar_t *wbuf)
char *oldlocale = setlocale(LC_CTYPE, NULL);
setlocale(LC_CTYPE, "utf-8");
- /* uvuni_to_utf8(buf, chr) or Encoding::_bytes_to_utf8(sv, "UCS-2BE"); */
+ /* uvchr_to_utf8(buf, chr) or Encoding::_bytes_to_utf8(sv, "UCS-2BE"); */
wlen = wcsrtombs(NULL, (const wchar_t **)&wbuf, wlen, NULL);
buf = (char *) safemalloc(wlen+1);
wcsrtombs(buf, (const wchar_t **)&wbuf, wlen, NULL);
@@ -176,7 +176,7 @@ utf8_to_wide(const char *buf)
setlocale(LC_CTYPE, "utf-8");
wbuf = (wchar_t *) safemalloc(wlen);
- /* utf8_to_uvuni_buf(pathname, pathname + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
+ /* utf8_to_uvchr_buf(pathname, pathname + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
wlen = mbsrtowcs(wbuf, (const char**)&buf, wlen, &mbs);
if (oldlocale) setlocale(LC_CTYPE, oldlocale);
@@ -283,7 +283,7 @@ XS(XS_Cygwin_win_to_posix_path)
mbstate_t mbs;
char *oldlocale = setlocale(LC_CTYPE, NULL);
setlocale(LC_CTYPE, "utf-8");
- /* utf8_to_uvuni_buf(src_path, src_path + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
+ /* utf8_to_uvchr_buf(src_path, src_path + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
wlen = mbsrtowcs(wpath, (const char**)&src_path, wlen, &mbs);
if (wlen > 0)
err = cygwin_conv_path(what, wpath, wbuf, wlen);
@@ -370,7 +370,7 @@ XS(XS_Cygwin_posix_to_win_path)
setlocale(LC_CTYPE, "utf-8");
if (!IN_BYTES) {
mbstate_t mbs;
- /* utf8_to_uvuni_buf(src_path, src_path + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
+ /* utf8_to_uvchr_buf(src_path, src_path + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
wlen = mbsrtowcs(wpath, (const char**)&src_path, wlen, &mbs);
if (wlen > 0)
err = cygwin_conv_path(what, wpath, wbuf, wlen);