summaryrefslogtreecommitdiff
path: root/src/hardcopy.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-05 20:41:53 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-05 20:41:53 +0000
commit910f66f90c928da8b607ccfdc12fc33d9cb8d4a9 (patch)
tree152a03d1d7ea3e8d433addba4f463d8a7a68a5fd /src/hardcopy.c
parente2f98b95c8071f772695602cd4f714dc588eb8e7 (diff)
downloadvim-git-910f66f90c928da8b607ccfdc12fc33d9cb8d4a9.tar.gz
updated for version 7.0c10v7.0c10
Diffstat (limited to 'src/hardcopy.c')
-rw-r--r--src/hardcopy.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/hardcopy.c b/src/hardcopy.c
index e9aa2bd91..e6c89a616 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -2473,6 +2473,7 @@ mch_print_init(psettings, jobname, forceit)
double top;
double bottom;
#ifdef FEAT_MBYTE
+ int props;
int cmap;
char_u *p_encoding;
struct prt_ps_encoding_S *p_mbenc;
@@ -2510,22 +2511,26 @@ mch_print_init(psettings, jobname, forceit)
* This is to cope with the fact that various unicode encodings are
* supported in more than one of CJK. */
p_mbenc = NULL;
- p_mbenc_first = NULL;
- p_mbchar = NULL;
- for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
- if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
+ props = enc_canon_props(p_encoding);
+ if (!(props & ENC_8BIT) && (*p_penc != NUL || *p_pmcs != NUL))
+ {
+ p_mbenc_first = NULL;
+ p_mbchar = NULL;
+ for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
+ if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
&p_mbenc))
- {
- if (p_mbenc_first == NULL)
- p_mbenc_first = p_mbenc;
- if (prt_match_charset((char *)p_pmcs, &prt_ps_mbfonts[cmap],
+ {
+ if (p_mbenc_first == NULL)
+ p_mbenc_first = p_mbenc;
+ if (prt_match_charset((char *)p_pmcs, &prt_ps_mbfonts[cmap],
&p_mbchar))
- break;
- }
+ break;
+ }
- /* Use first encoding matched if no charset matched */
- if (p_mbchar == NULL && p_mbenc_first != NULL)
- p_mbenc = p_mbenc_first;
+ /* Use first encoding matched if no charset matched */
+ if (p_mbchar == NULL && p_mbenc_first != NULL)
+ p_mbenc = p_mbenc_first;
+ }
prt_out_mbyte = (p_mbenc != NULL);
if (prt_out_mbyte)