SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

Many file extensions have ASCII problems

Open cycle2zhou opened this issue 3 years ago • 2 comments

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

cycle2zhou avatar Sep 14 '22 03:09 cycle2zhou

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

sbarex avatar Sep 14 '22 06:09 sbarex

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

cycle2zhou avatar Sep 14 '22 09:09 cycle2zhou