about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2005-03-03 14:13:03 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2005-03-03 14:13:03 +0000
commit1b50dff802c0aa187c8947af9a017495e98c097a (patch)
tree6198308ec25a90a467e0f02de7788ac95fa5bc8d /Src/utils.c
parenteb8232757617f5de0a602f6de27cbc9c77d3447c (diff)
downloadzsh-1b50dff802c0aa187c8947af9a017495e98c097a.tar.gz
zsh-1b50dff802c0aa187c8947af9a017495e98c097a.tar.xz
zsh-1b50dff802c0aa187c8947af9a017495e98c097a.zip
20921: using UCS-4BE instead of ISO-10646 to identify character encoding
is more portable, find more encodings in iconv completion on Solaris
20924: make error message more specific
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 469361c33..f33dda54d 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3617,13 +3617,13 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
 		    ICONV_CONST char *inptr = inbuf;
     	    	    inbytes = 4;
 		    outbytes = 6;
-		    /* assume big endian convention for UCS-4 */
+		    /* store value in big endian form */
 		    for (i=3;i>=0;i--) {
 			inbuf[i] = wval & 0xff;
 			wval >>= 8;
 		    }
 
-    	    	    cd = iconv_open(nl_langinfo(CODESET), "ISO-10646");
+    	    	    cd = iconv_open(nl_langinfo(CODESET), "UCS-4BE");
 		    if (cd == (iconv_t)-1) {
 			zerr("cannot do charset conversion", NULL, 0);
 			if (fromwhere == 4) {
@@ -3637,7 +3637,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
                     count = iconv(cd, &inptr, &inbytes, &t, &outbytes);
 		    iconv_close(cd);
 		    if (count == (size_t)-1) {
-                        zerr("cannot do charset conversion", NULL, 0);
+                        zerr("character not in range", NULL, 0);
 		        *t = '\0';
 			*len = t - buf;
 			return buf;