native2ascii(1)

✨ native2ascii(1) ✨

Internationalization Tools πŸ’– β€” okay bestie, gather round, because this little tool is genuinely the moment.


πŸŽ€ NAME πŸŽ€

native2ascii β€” creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes… or the other way around, because she's versatile like that πŸ’…


🌸 SYNOPSIS 🌸

native2ascii [ inputfile ] [ outputfile ]
  • inputfile β€” the encoded file that's getting converted to ASCII. she's the one going in πŸ¦‹
  • outputfile β€” the converted ASCII file. the glow-up result ✨

πŸ’– DESCRIPTION πŸ’–

So like. The native2ascii command takes encoded files that are supported by the Java Runtime Environment (JRE) and converts them into files encoded in ASCII, using Unicode escapes (\uxxxx) notation for literally every character that isn't part of the ASCII character set. no cap.

Why do we even care? Because this process is required for properties files that contain characters that are not in ISO-8859-1 character sets. it's giving "necessary paperwork" but make it iconic πŸ“

And the plot twist: this tool can also perform the reverse conversion. she does both directions. main character energy fr fr πŸ‘‘

Now the input/output tea:

  • If the outputfile value is omitted, then standard output is used for output.
  • If, in addition, the inputfile value is omitted too, then standard input is used for input.

so you can just pipe stuff in and vibe. 🫢


✨ OPTIONS ✨

  • -reverse β€” performs the reverse operation: converts a file encoded in ISO-8859-1 with Unicode escapes to a file in any character encoding supported by the JRE. yes queen, backwards and forwards πŸ”„
  • -encoding encoding_name β€” specifies the name of the character encoding to be used by the conversion procedure. If this option is not present, then the default character encoding is used (as determined by the java.nio.charset.Charset.defaultCharset method). The encoding_name string must be the name of a character encoding that is supported by the JRE. See Supported Encodings at http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html 🌈
  • -Joption β€” passes option to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1). πŸ’€ (yes, that's the whole option name β€” no space, just -J glued to whatever you're passing along. iykyk)
⚠️ Heads up bestie: that -encoding name has to be something the JRE actually supports, and when you skip it you're rolling with the platform default β€” so don't be surprised if the vibes differ between machines. πŸ™ˆ

and that's the whole page, no skips, no skipped options, we ate and left no crumbs πŸ“πŸ§š

JDK 8 🌸 21 November 2013 β€” mwah, love u, go convert something πŸ’œβœ¨