From kukovecmatic at hotmail.com Fri Dec 1 18:56:05 2023 From: kukovecmatic at hotmail.com (Matic Kukovec) Date: Fri, 1 Dec 2023 18:56:05 +0000 Subject: Chinese characters? Message-ID: Hi guys, Specs: * Windows 10 x64 * Python 3.12 * PyQt6.5.3 / QScintilla2.14.1 Anyone know why I can't get Chinese characters to display correctly: [cid:a6eb4b63-b2fe-4876-8bfe-770ea99d7d8e] I'm using the "Courier New" font and "self.setUtf8(True)". Also tried "self.SendScintilla(self.SCI_SETCODEPAGE, self.SC_CP_UTF8, 0);", but no changes. Notepad++ uses the same font and it displays them correctly. Any ideas? Thanks, Matic -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 13820 bytes Desc: image.png URL: From kukovecmatic at hotmail.com Fri Dec 1 19:33:14 2023 From: kukovecmatic at hotmail.com (Matic Kukovec) Date: Fri, 1 Dec 2023 19:33:14 +0000 Subject: Chinese characters? In-Reply-To: References: Message-ID: Found the problem. I was always reading the file with the 'open' function using the 'utf-8' encoding. Changing the enoding to "gb2312" fixed it. Regards, Matic ________________________________ From: Matic Kukovec Sent: Friday, December 1, 2023 7:56 PM To: QScintilla Subject: Chinese characters? Hi guys, Specs: * Windows 10 x64 * Python 3.12 * PyQt6.5.3 / QScintilla2.14.1 Anyone know why I can't get Chinese characters to display correctly: [cid:a6eb4b63-b2fe-4876-8bfe-770ea99d7d8e] I'm using the "Courier New" font and "self.setUtf8(True)". Also tried "self.SendScintilla(self.SCI_SETCODEPAGE, self.SC_CP_UTF8, 0);", but no changes. Notepad++ uses the same font and it displays them correctly. Any ideas? Thanks, Matic -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 13820 bytes Desc: image.png URL: