Closed mark9804 closed 2 years ago
On my system (intel macOS 12.3) that json code, saved as utf-8, is displayed correctly.
Can you send me your file to see what encoding it uses?
I created with and saved the file as utf-8 with vscode too on my intel macOS 12.3 (21E230). The file link goes as follows.
https://www.dropbox.com/s/spzqi41pfgj41fl/SyntaxHighlight%20Non-ascii%20encoding%20test.json?dl=0
I removed all custom generators (qlImageSize
, QLMarkdown
, QLStephen
) and refreshed quicklook with qlmanage -r
and restarted system to make sure content rendering is really controlled by SyntaxHighlight. I confirmed this by changing SyntaxHighlight's theme and saw the theme had changed.
Which rendering engine do you use: html or rtf? On macOS 12 I recommended using the html engine.
The bug is only for JSON files? if true, in Settings > Formats > JSON, remove the preprocessor setting if it is set.
If this not resolve, in Settings enable the debug option. The open a quick look preview, then please send me the colorize.html
file generated on your desktop.
plain text file
, javascript
and python
) and this doesn't happen. I guess it's a JSON only bug. No special settings for JSON is set.
ok, mark the preprocessor option and put a single space as the value.
ok, mark the preprocessor option and put a single space as the value.
This step produces the correct output. Now the content is shown in CJK characters.
The preprocessor was used to beautify for json files. In the next release I will remove this default option that cause a lot of problems.
Thanks for the work!
Fixed on release 2.1.11.
Current Syntax Highlight Version
2.1.10
macOS Version
Monterey 12.2.1 (21D62)
Feature Description
Hi sbarex,
When I try to preview a JSON file with non-ascii (in my case, CJK characters) characters present, they will be parsed into ascii-safe form (e.g.
\u6d4b\u8bd5…
). If possible, would you kindly implement an option to allow SyntaxHighlight to display non-ascii characters?Screenshot
Test case