Converting a literal UTF-8 string into its corresponding byte sequence.
Patch by David Lawrence Ramsey. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
5e901c41e8
commit
91c740ed3b
|
@ -1,3 +1,7 @@
|
|||
2014-04-08 David Lawrence Ramsey <pooka109@gmail.com>
|
||||
* src/nano.c (main): Convert the literal UTF-8 whitespace string into
|
||||
its corresponding byte sequence, and add a comment for it.
|
||||
|
||||
2014-04-08 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/rcfile.c (parse_binding): Melt the binding and unbinding code,
|
||||
which are very similar, into a single function.
|
||||
|
|
|
@ -2595,11 +2595,14 @@ int main(int argc, char **argv)
|
|||
matchbrackets = mallocstrcpy(NULL, "(<[{)>]}");
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
/* If whitespace wasn't specified, set its default value. */
|
||||
/* If whitespace wasn't specified, set its default value. If we're
|
||||
* using UTF-8, it's Unicode 00BB (Right-Pointing Double Angle
|
||||
* Quotation Mark) and Unicode 00B7 (Middle Dot). Otherwise, it's
|
||||
* ">" and ".". */
|
||||
if (whitespace == NULL) {
|
||||
#ifdef ENABLE_UTF8
|
||||
if (using_utf8()) {
|
||||
whitespace = mallocstrcpy(NULL, "»·");
|
||||
whitespace = mallocstrcpy(NULL, "\xC2\xBB\xC2\xB7");
|
||||
whitespace_len[0] = 2;
|
||||
whitespace_len[1] = 2;
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue