diff -r d88c5d15a4af -r d697072a92f5 components/ksh93/patches/CR7065478.patch --- a/components/ksh93/patches/CR7065478.patch Mon Apr 13 09:25:17 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ ---- a/src/lib/libast/comp/setlocale.c Mon Dec 27 04:23:49 2010 -+++ b/src/lib/libast/comp/setlocale.c Fri Jul 22 00:30:31 2011 -@@ -19,6 +19,9 @@ - * Phong Vo * - * * - ***********************************************************************/ -+/* -+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. -+ */ - #pragma prototyped - - /* -@@ -2236,6 +2239,24 @@ - - typedef int (*Isw_f)(wchar_t); - -+static int -+wide_wctomb(char* u, wchar_t w) -+{ -+ int size = 0; -+ -+ if (u) -+ { -+ size = wctomb(u, w); -+ if (size < 0) -+ { -+ *u = (char)(w & 0xff); -+ size = 1; -+ } -+ } -+ -+ return size; -+} -+ - /* - * called when LC_CTYPE initialized or changes - */ -@@ -2280,7 +2301,7 @@ - { - if (!(ast.mb_width = wcwidth)) - ast.mb_width = default_wcwidth; -- ast.mb_conv = wctomb; -+ ast.mb_conv = wide_wctomb; - #ifdef mb_state - { - /*