]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools/Scripts: Add ConvertUni.py script
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 15 Dec 2015 04:50:50 +0000 (04:50 +0000)
committerjljusten <jljusten@Edk2>
Tue, 15 Dec 2015 04:50:50 +0000 (04:50 +0000)
commit3f45c1375d0e374ba71613b2da5f323215546410
treec73767fba3866446472afe2669322e142498b4ff
parent3b567f08f99df24a31fa06750171b7050e08f966
BaseTools/Scripts: Add ConvertUni.py script

This script uses python codecs to convert .uni string files between
the utf-16 and utf-8 formats.

The advantages of utf-8 data:
 * Generally smaller files
 * More commonly supported by editors
 * Not treated as binary data in patch files

The script was tested on MdePkg with both python 2.7 and python 3.4.
It was able to convert all MdePkg .uni files between utf-8 and utf-16
multiple times always producing the same files for each format.

v2:
 * Rename ConvertUtf16ToUtf8.py to ConvertUni.py
 * Also support utf-8 to utf-16 conversion (with --utf-16)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19247 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Scripts/ConvertUni.py [new file with mode: 0755]