Skip to content

Commit e912359

Browse files
committed
Fixed display of UTF-8 characters. Release 1.21
1 parent 5764525 commit e912359

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

NppJSONViewer/JSONDialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ HTREEITEM JSONDialog::insertToTree(HWND hWndDlg,HTREEITEM parent,char *text)
5959
int len = strlen(text) + 1;
6060
wchar_t *w_msg = new wchar_t[len];
6161
memset(w_msg, 0, len);
62-
MultiByteToWideChar(CP_ACP, NULL, text, -1, w_msg, len);
62+
MultiByteToWideChar(CP_UTF8, NULL, text, -1, w_msg, len);
6363

6464
tvinsert.item.pszText=w_msg;
6565
HTREEITEM item=(HTREEITEM)SendDlgItemMessage(hWndDlg,IDC_TREE1,TVM_INSERTITEM,0,(LPARAM)&tvinsert);
@@ -102,7 +102,7 @@ void JSONDialog::populateTree (HWND hWndDlg, HTREEITEM tree_root, json_t * json_
102102
len = strlen(txt) + 1;
103103
wchar_t *w_txt = new wchar_t[len];
104104
memset(w_txt, 0, len);
105-
MultiByteToWideChar(CP_ACP, NULL, txt, -1, w_txt, len);
105+
MultiByteToWideChar(CP_UTF8, NULL, txt, -1, w_txt, len);
106106

107107
t.pszText=w_txt;
108108
t.mask=TVIF_TEXT;
@@ -137,7 +137,7 @@ void JSONDialog::populateTree (HWND hWndDlg, HTREEITEM tree_root, json_t * json_
137137
len = strlen(txt) + 1;
138138
wchar_t *w_txt = new wchar_t[len];
139139
memset(w_txt, 0, len);
140-
MultiByteToWideChar(CP_ACP, NULL, txt, -1, w_txt, len);
140+
MultiByteToWideChar(CP_UTF8, NULL, txt, -1, w_txt, len);
141141

142142
t.pszText=w_txt;
143143
t.mask=TVIF_TEXT;

NppJSONViewer/resource.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ FONT 8, "Ms Shell Dlg"
2525
LTEXT "Author:", IDC_STATIC, 27, 21, 24, 8, SS_LEFT
2626
LTEXT "Kapil Ratnani", IDC_STATIC, 105, 21, 43, 8, SS_LEFT
2727
LTEXT "Version:", IDC_STATIC, 27, 35, 26, 8, SS_LEFT
28-
LTEXT "1.20", IDC_STATIC, 104, 35, 15, 8, SS_LEFT
28+
LTEXT "1.21", IDC_STATIC, 104, 35, 15, 8, SS_LEFT
2929
LTEXT "Licence:", IDC_STATIC, 27, 48, 28, 8, SS_LEFT
3030
LTEXT "GPL", IDC_STATIC, 104, 48, 15, 8, SS_LEFT
3131
LTEXT "Special thanks to:", IDC_STATIC, 27, 63, 58, 8, SS_LEFT
@@ -53,8 +53,8 @@ FONT 8, "Ms Shell Dlg"
5353
//
5454
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
5555
1 VERSIONINFO
56-
FILEVERSION 1,20,0,0
57-
PRODUCTVERSION 1,20,0,0
56+
FILEVERSION 1,21,0,0
57+
PRODUCTVERSION 1,21,0,0
5858
FILEOS VOS__WINDOWS32
5959
FILETYPE VFT_DLL
6060
FILESUBTYPE VFT2_UNKNOWN
@@ -68,11 +68,11 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
6868
VALUE "Comments", "JSONViewer plugin for Notepad++"
6969
VALUE "CompanyName", "Kapil Ratnani"
7070
VALUE "FileDescription", "Notepad++ plugin"
71-
VALUE "FileVersion", "1.20"
71+
VALUE "FileVersion", "1.21"
7272
VALUE "InternalName", "JSONViewer"
7373
VALUE "OriginalFilename", "NPPJSONViewer.dll"
7474
VALUE "ProductName", "JSONViewer plugin for Notepad++"
75-
VALUE "ProductVersion", "1.20"
75+
VALUE "ProductVersion", "1.21"
7676
VALUE "SpecialBuild", "UNICODE"
7777
}
7878
}

README

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=================
2-
JSONViewer 1.20
2+
JSONViewer 1.21
33
by Kapil Ratnani
44
=================
55

@@ -22,6 +22,12 @@ Rui Maciel for mjson library
2222
==================
2323
Latest Updates:
2424
==================
25+
26+
----
27+
1.21
28+
----
29+
1. Fixed display of UTF-8 characters.
30+
2531
----
2632
1.20
2733
----

0 commit comments

Comments
 (0)