From 89e06c807ac63030dd163092e1c58f9ce350aeee Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 11 Aug 2017 20:55:55 +0200 Subject: [PATCH] patch 8.0.0907: with cp932 font names might be misinterpreted Problem: With cp932 font names might be misinterpreted. Solution: Do not see "_" as a space when it is the second byte of a double byte character. (Ken Takata) --- src/os_mswin.c | 4 +++- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/os_mswin.c b/src/os_mswin.c index 815454955c..ef756421fc 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -2965,7 +2965,9 @@ get_logfont( int did_replace = FALSE; for (i = 0; lf->lfFaceName[i]; ++i) - if (lf->lfFaceName[i] == '_') + if (IsDBCSLeadByte(lf->lfFaceName[i])) + ++i; + else if (lf->lfFaceName[i] == '_') { lf->lfFaceName[i] = ' '; did_replace = TRUE; diff --git a/src/version.c b/src/version.c index a941d85cba..40515883ce 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 907, /**/ 906, /**/