commit d1a44eb9481f18ca12e7e2c4bd47924ab26a07a1
parent 3850b59d2950fa741a7ee02aa03a0919d557b9f5
Author: ukai <ukai>
Date: Tue, 22 Jul 2003 17:27:19 +0000
[w3m-dev 03941] fix character encoding for 'v'
* main.c (vwSrc): use document_code as DisplayCode
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-23 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03941] fix character encoding for 'v'
+ * main.c (vwSrc): use document_code as DisplayCode
+
2003-07-23 Yoshinobu Sakane <sakane@d4.bsd.nes.nec.co.jp>
* [w3m-dev 03939] next/prev visited link
diff --git a/main.c b/main.c
@@ -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;
}