diff --git a/ChangeLog b/ChangeLog
index 70764eff9922117fb19b38777a8313f16a09eb52..9ed41b141df672c60275816ac9f686e5bf77897c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -138,6 +138,9 @@ CVS code -
 	  invalid, since the C library's multibyte functions don't seem
 	  to.  New function is_valid_unicode(); changes to mbrep() and
 	  make_mbchar(). (DLR)
+	- Store Unicode values in longs instead of ints.  Changes to
+	  make_mbchar(), parse_kbinput(), get_unicode_kbinput(), and
+	  parse_verbatim_kbinput(). (DLR)
 - color.c:
 	- Remove unneeded fcntl.h include. (DLR)
 - chars.c:
diff --git a/src/chars.c b/src/chars.c
index 8703d9cc1fae756afa536f5a8a43f6a06e5e426c..c7f61038cfd2f9f268c96120f8c586986f1375b3 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -315,12 +315,12 @@ int mb_cur_max(void)
 	1;
 }
 
-/* Convert the value in chr to a multibyte character with the same
- * wide character value as chr, if possible.  If the conversion
+/* Convert the Unicode value in chr to a multibyte character with the
+ * same wide character value as chr, if possible.  If the conversion
  * succeeds, return the (dynamically allocated) multibyte character and
  * its length.  Otherwise, return an undefined (dynamically allocated)
  * multibyte character and a length of zero. */
-char *make_mbchar(int chr, int *chr_mb_len)
+char *make_mbchar(long chr, int *chr_mb_len)
 {
     char *chr_mb;
 
diff --git a/src/proto.h b/src/proto.h
index 86ef80eedafb92bbf8a7f4e36bbefa79c2df9b50..a759f559073c589d7ca36d11d715ade2e58c789f 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -159,7 +159,7 @@ char *control_mbrep(const char *c, char *crep, int *crep_len);
 char *mbrep(const char *c, char *crep, int *crep_len);
 int mbwidth(const char *c);
 int mb_cur_max(void);
-char *make_mbchar(int chr, int *chr_mb_len);
+char *make_mbchar(long chr, int *chr_mb_len);
 int parse_mbchar(const char *buf, char *chr, size_t *col);
 size_t move_mbleft(const char *buf, size_t pos);
 size_t move_mbright(const char *buf, size_t pos);
@@ -592,7 +592,7 @@ int get_byte_kbinput(int kbinput
 	, bool reset
 #endif
 	);
-int get_unicode_kbinput(int kbinput
+long get_unicode_kbinput(int kbinput
 #ifndef NANO_SMALL
 	, bool reset
 #endif
diff --git a/src/winio.c b/src/winio.c
index a48ca48ab480682d6d13ea46b0f8cc759cca6f33..3ecde58555547e3713438f7d7a34f5174f88e802 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -568,7 +568,8 @@ int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key
 
 			    /* Put back the multibyte equivalent of the
 			     * byte value. */
-			    byte_mb = make_mbchar(byte, &byte_mb_len);
+			    byte_mb = make_mbchar((long)byte,
+				&byte_mb_len);
 
 			    seq = (int *)nmalloc(byte_mb_len *
 				sizeof(int));
@@ -1232,16 +1233,17 @@ int get_byte_kbinput(int kbinput
 }
 
 /* Translate a Unicode sequence: turn a four-digit hexadecimal number
- * from 0000 to FFFF(case-insensitive) into its corresponding multibyte
+ * from 0000 to FFFF (case-insensitive) into its corresponding multibyte
  * value. */
-int get_unicode_kbinput(int kbinput
+long get_unicode_kbinput(int kbinput
 #ifndef NANO_SMALL
 	, bool reset
 #endif
 	)
 {
-    static int uni_digits = 0, uni = 0;
-    int retval = ERR;
+    static int uni_digits = 0;
+    static long uni = 0;
+    long retval = ERR;
 
 #ifndef NANO_SMALL
     if (reset) {
@@ -1328,7 +1330,7 @@ int get_unicode_kbinput(int kbinput
     }
 
 #ifdef DEBUG
-    fprintf(stderr, "get_unicode_kbinput(): kbinput = %d, uni_digits = %d, uni = %d, retval = %d\n", kbinput, uni_digits, uni, retval);
+    fprintf(stderr, "get_unicode_kbinput(): kbinput = %d, uni_digits = %d, uni = %ld, retval = %ld\n", kbinput, uni_digits, uni, retval);
 #endif
 
     return retval;
@@ -1415,7 +1417,8 @@ int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len)
  * that, leave the input as-is. */ 
 int *parse_verbatim_kbinput(WINDOW *win, size_t *kbinput_len)
 {
-    int *kbinput, uni, *retval;
+    int *kbinput, *retval;
+    long uni;
 
     /* Read in the first keystroke. */
     while ((kbinput = get_input(win, 1)) == NULL);