4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Cannot use Unicode digraphs while 'encoding' is not Unicode.
12 Solution: Convert the character from Unicode to 'encoding' when needed.
13 Use the Unicode digraphs for the Macintosh. (Eckehard Berns)
17 *** ../vim-6.2.302/src/digraph.c Thu Feb 5 16:04:26 2004
18 --- src/digraph.c Wed Feb 25 15:12:53 2004
32 ! # if defined(MACOS) && !defined(FEAT_MBYTE)
42 + # define USE_UNICODE_DIGRAPHS
52 + # ifdef USE_UNICODE_DIGRAPHS
53 + if (retval != 0 && !enc_utf8)
60 + * Convert the Unicode digraph to 'encoding'.
62 + i = utf_char2bytes(retval, buf);
63 + if (convert_setup(&vc, (char_u *)"utf-8", p_enc) == OK)
66 + to = string_convert(&vc, buf, &i);
69 + /* Checking for invalid values isn't very easy. Internal
70 + * latin1 conversion will return char 0xbf in case it can't be
72 + if ((i > 1 && !has_mbyte)
73 + || (vc.vc_type == CONV_TO_LATIN1 && utflen != 1
75 + /* assume invalid value */
78 + retval = (*mb_ptr2char)(to);
85 /* Ignore multi-byte characters when not in multi-byte mode. */
86 if (!has_mbyte && retval > 0xff)
91 for (i = 0; dp->char1 != NUL && !got_int; ++i)
93 if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result
95 && (has_mbyte || dp->result <= 255)
104 for (i = 0; dp->char1 != NUL && !got_int; ++i)
106 + #if defined(USE_UNICODE_DIGRAPHS) && defined(FEAT_MBYTE)
109 + /* May need to convert the result to 'encoding'. */
110 + tmp.char1 = dp->char1;
111 + tmp.char2 = dp->char2;
112 + tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE);
113 + if (tmp.result != 0 && tmp.result != tmp.char2
114 + && (has_mbyte || tmp.result <= 255))
115 + printdigraph(&tmp);
118 if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result
120 && (has_mbyte || dp->result <= 255)
128 *** ../vim-6.2.302/src/version.c Mon Mar 1 16:54:50 2004
129 --- src/version.c Mon Mar 1 16:59:41 2004
133 { /* Add new patch number below this line */
140 CUSTOMER: Nothing -- here's your nine pence.
141 DEAD PERSON: I'm not dead!
142 MORTICIAN: Here -- he says he's not dead!
143 CUSTOMER: Yes, he is.
144 DEAD PERSON: I'm not!
145 The Quest for the Holy Grail (Monty Python)
147 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
148 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
149 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
150 \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///