Ahem. Now pterm actually uses wc_to_mb in a situation where it needs
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 7 Jan 2003 13:09:56 +0000 (13:09 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 7 Jan 2003 13:09:56 +0000 (13:09 +0000)
to pass in a default character, it would help if wc_to_mb actually
_honoured_ the default-character parameter.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2490 cda61777-01e9-0310-a592-d414129be87e

unix/uxucs.c

index 9fb7673..01aae62 100644 (file)
@@ -97,7 +97,7 @@ int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
        return n;
     } else {
        return charset_from_unicode(&wcstr, &wclen, mbstr, mblen, codepage,
-                                   NULL, NULL, 0);
+                                   NULL, defchr?defchr:NULL, defchr?1:0);
     }
 }