VS Code extension that converts characters with Unicode escapes or vice versa. The same as 'native2ascii' tool of JDK.
-
Commands (manual execution):
Convert characters: Native to Ascii
- Convert all non-ASCII characters in the active text document with Unicode escapes.Convert characters: Ascii to Native
- Convert all Unicode escapes characters in the active text document with native characters.
-
Options:
- If you activate a properties file, the command "Ascii to Native" invoked automatically.
- If you save a properties file, the command "Native to Ascii" invoked automatically.
- You can exclude the comment lines (that start with '#') in converting "Native to Ascii".
This extension contributes the following settings:
native-ascii-converter.letter-case
: Letter case in Unicode characters"Lower case"
(default)"Upper case"
native-ascii-converter.comment-conversion
: Unicode conversion of the comment is carried outtrue
: carried out (default)false
: not carried out
native-ascii-converter.auto-conversion-on-save
: Convert automatically when a properties file is savedtrue
: effectivefalse
: ineffective (default)
native-ascii-converter.auto-conversion-on-activate
: Convert automatically when a properties file is activatedtrue
: effectivefalse
: ineffective (default)
native-ascii-converter.use-files.associations
: Use "files.associations" in the settings.json for the automatic conversionstrue
: Use "files.associations" in the settings.jsonfalse
: Not use "files.associations". A file which name ends with only "*.properties" is converted automatically. (default)
If native-ascii-converter.use-files.associations
is true
and the settings.json is set as follows, the file which name matches *.properties
or *.properties.prod
is converted automatically.
{
"files.associations": {
"*.properties": "properties",
"*.properties.prod": "properties"
}
}