summaryrefslogtreecommitdiffstats
path: root/BaseTools/Scripts/ConvertUni.py
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-8/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Replace StringIO.StringIO with io.BytesIOGary Lin2018-06-271-5/+0
| | | | | | | | | | | | Replace StringIO.StringIO with io.BytesIO to be compatible with python3. This commit also removes "import StringIO" from those python scripts that don't really use it. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Scripts: Add ConvertUni.py scriptJordan Justen2015-12-151-0/+137
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