From 47a2009371e9796ede55c3dd8a0acb1b82525c0d Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 22 Jul 2003 17:27:19 +0000 Subject: [w3m-dev 03941] fix character encoding for 'v' * main.c (vwSrc): use document_code as DisplayCode From: Hironori SAKAMOTO --- main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 6eb5a40..992b0bf 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.227 2003/07/22 17:24:49 ukai Exp $ */ +/* $Id: main.c,v 1.228 2003/07/22 17:27:19 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -4531,12 +4531,22 @@ vwSrc(void) if (Currentbuf->sourcefile == NULL) { if (Currentbuf->pagerSource && !strcasecmp(Currentbuf->type, "text/plain")) { +#ifdef JP_CHARSET + char old_code; +#endif FILE *f; Str tmpf = tmpfname(TMPF_SRC, NULL); f = fopen(tmpf->ptr, "w"); if (f == NULL) return; +#ifdef JP_CHARSET + old_code = DisplayCode; + DisplayCode = Currentbuf->document_code; +#endif saveBufferBody(Currentbuf, f, TRUE); +#ifdef JP_CHARSET + DisplayCode = old_code; +#endif fclose(f); Currentbuf->sourcefile = tmpf->ptr; } -- cgit v1.2.3