ObsidianX / 3dstools

Tools for extracting and packing resources found in 3DS games
51 stars 15 forks source link

Add ensure_ascii option on bffnt.py #26

Closed mirusu400 closed 3 years ago

mirusu400 commented 3 years ago
usage: bffnt [-h] [-v] [-d] [-y] [-l | -b] (-c | -x) -f bffnt

BFFNT Converter Tool

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         print more data when working
  -d, --debug           print debug information
  -y, --yes             answer yes to any questions (overwriting files)
++  -a, --ensure-ascii    turn off ensure_ascii option when dump json file
  -l, --little-endian   Use little endian encoding in the created BFFNT file
                        (default)
  -b, --big-endian      Use big endian encoding in the created BFFNT file
  -c, --create          create BFFNT file from extracted files
  -x, --extract         extract BFFNT into PNG/JSON files
  -f bffnt, --file bffnt
                        BFFNT file

When extracting manifest.json file, ensure-ascii option is always True so unicode-characters are always presentated as ascii characters. I add ensure-ascii option on bffnt.py, to save as original unicode characters. It doesn't matter even create bffnt file.