and NANO_APPEND_KEY are. Changes to shortcut_init(), usage(),
main(), search_init(), nanorc.sample, nano.1, nanorc.5,
nano.texi, etc. (DLR)
+ - When reading a file in, make sure each line is a valid
+ multibyte string. Changes to make_mbstring(), read_line(),
+ and do_credits(). (DLR)
- chars.c:
make_mbstring()
- Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a
return chr_mb;
}
-#if defined(ENABLE_NANORC) || defined(NANO_EXTRA)
+#if !defined(NANO_SMALL) || defined(ENABLE_NANORC) || defined(NANO_EXTRA)
/* Convert the string str to a valid multibyte string with the same wide
* character values as str. Return the (dynamically allocated)
* multibyte string. */
fileptr->data = mallocstrcpy(NULL, buf);
#ifndef NANO_SMALL
- /* If it's a DOS file (CR LF), and file conversion isn't disabled,
- * strip out the CR part. */
- if (!ISSET(NO_CONVERT) && len > 0 && buf[len - 1] == '\r')
- fileptr->data[len - 1] = '\0';
+ if (!ISSET(NO_CONVERT)) {
+ /* If it's a DOS file (CR LF), and file conversion isn't
+ * disabled, strip the CR part from fileptr->data. */
+ if (len > 0 && buf[len - 1] == '\r')
+ fileptr->data[len - 1] = '\0';
+
+ /* Make sure fileptr->data is a valid multibyte string. */
+ fileptr->data = mallocstrassn(fileptr->data,
+ make_mbstring(fileptr->data));
+ }
#endif
if (*first_line_ins || fileage == NULL) {
if (*option == '"')
option++;
ptr = parse_argument(ptr);
+
+ /* Make sure option is a valid multibyte
+ * string. */
option = make_mbstring(option);
#ifdef DEBUG
fprintf(stderr, "option = \"%s\"\n", option);
"David Benbennick",
"Ken Tyler",
"Sven Guckes",
- "Florian Kรถnig",
+ "Florian K\xF6nig",
"Pauli Virtanen",
"Daniele Medri",
"Clement Laforet",