sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.
GNU General Public License v3.0
2.96k stars 71 forks source link

Many file extensions have ASCII problems #192

Closed cycle2zhou closed 1 year ago

cycle2zhou commented 2 years ago

Json and.properties have ASCII problems

Json can be added by adding a preprocessor to solve the beautification problem, but native Python3 to solve the ASCII problem parameters do not support, so can not solve the ASCII problem; Command: python3 -m json.tool --no-ensure-ascii $targetHL

Use version 2.1.15

Originally posted by @cycle2zhou in https://github.com/sbarex/SourceCodeSyntaxHighlight/issues/156#issuecomment-1245410858

sbarex commented 2 years ago

I removed the default preprocessor for the json format some time ago because it failed to process non-perfectly compliant files. But if you changed the settings it may have remained set after the updates.

In your example the preprocessor is misconfigured: python -m json.tool: error: unrecognized arguments: --no-ensure-ascii

cycle2zhou commented 2 years ago

Native Python3 commands can beautify and display Chinese properly:python3 -m json.tool --no-ensure-ascii $targetHL

Sorry about the wrong file, this is the file in question file.zip

The file contains both.json and.properties which have ASCII problems