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 <[email protected]>
Sent: Friday, December 1, 2023 7:56 PM
To: QScintilla <[email protected]>
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



Reply via email to