> On May 4, 2015, at 8:57 AM, Kinney, Michael D <michael.d.kin...@intel.com 
> <mailto:michael.d.kin...@intel.com>> wrote:
> 
> Jordan,
> 
> Some source control systems provide support a file type of UTF-16LE, so the 
> use of 'binary' should be avoided.  What source control systems require the 
> use of 'binary'?  What diff utilities are having issues with UTF-16LE files?  
> Can you provide some examples?
> 

Mike, 

I found on a Mac that vi, and BBEdit don’t have any issue with the *.uni files. 
I can also view them from the web 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/MdePkg.uni 
<https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/MdePkg.uni>

From a git point of view `git difftool` works, it points to Araxis Merge. `git 
diff` seems to have an issue if I don’t pass --text.

~/work/src/edk2/MdePkg(master)>git diff MdePkg.uni 
diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni
index 893e62c..d58ef7b 100644
Binary files a/MdePkg/MdePkg.uni and b/MdePkg/MdePkg.uni differ
~/work/src/edk2/MdePkg(master)>git diff --text MdePkg.uni 
diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni
index 893e62c..d58ef7b 100644
--- a/MdePkg/MdePkg.uni
+++ b/MdePkg/MdePkg.uni
@@ -18,7 +18,7 @@
 // **/
 
 
-#string STR_PACKAGE_ABSTRACT            #language en-US "This Package provides 
all definitions, library classes and libraries instances."
+#string STR_PACKAGE_ABSTRACT            #language en-US "This FISH Package 
provides all definitions, library classes and libraries instances."
 
 #string STR_PACKAGE_DESCRIPTION         #language en-US "It also provides the 
definitions(including PPIs/PROTOCOLs/GUIDs) of EFI1.10/UEFI2.4/PI1.3 and some 
Industry Standards."
 
~/work/src/edk2/MdePkg(master)>

It looks like a .gitattributes file solves the issue:
~/work/src/edk2(master)>cat .gitattributes 
*.uni diff
~/work/src/edk2(master)>git diff  MdePkg/MdePkg.uni 
diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni
index 893e62c..d58ef7b 100644
--- a/MdePkg/MdePkg.uni
+++ b/MdePkg/MdePkg.uni
@@ -18,7 +18,7 @@
 // **/
 
 
-#string STR_PACKAGE_ABSTRACT            #language en-US "This Package provides 
all definitions, library classes and libraries instances."
+#string STR_PACKAGE_ABSTRACT            #language en-US "This FISH Package 
provides all definitions, library classes and libraries instances."
 
 #string STR_PACKAGE_DESCRIPTION         #language en-US "It also provides the 
definitions(including PPIs/PROTOCOLs/GUIDs) of EFI1.10/UEFI2.4/PI1.3 and some 
Industry Standards."
 

From searching the web it would seem if the above does not work it is an issue 
with the terminal program being used. 

Thanks,

Andrew Fish 

> Also, what are the pros/cons to extending the exiting .uni file extension to 
> support either UTF16-LE or UTF-8 encodings vs. adding a new file extension?
> 
> Thanks,
> 
> Mike
> 
> 
> -----Original Message-----
> From: Jordan Justen [mailto:jordan.l.jus...@intel.com 
> <mailto:jordan.l.jus...@intel.com>] 
> Sent: Sunday, May 03, 2015 11:15 PM
> To: edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
> Subject: [edk2] [PATCH 0/9] Support UTF-8 (.utf8) string files
> 
> The UTF-16 .uni files are fairly annoying to work with:
> * They must be checked in as 'binary' files
> * It is difficult to produce a diff of changes
> * UTF-8 is more likely to be supported by text editors
> 
> With some basic testing on Linux, it appears that UTF-8 works as
> expected with UTF-8 files. Both git and subversion diff output show
> unicode characters > 0xff as expected.
> 
> Note, these changes only affect the source input for unicode string
> data. The output of string processing still always produces UTF-16LE
> character strings. This is required since UEFI only supports UTF-16LE
> string data.
> 
> These changes are available in git at:
> https://github.com/jljusten/edk2.git <https://github.com/jljusten/edk2.git> 
> utf8-v1
> 
> Jordan Justen (9):
>  BaseTools/Tests: Always add BaseTools source to import path
>  BaseTools/EdkLogger: Support unit tests with a SILENT log level
>  BaseTools/Tests: Add unit test for AutoGen.UniClassObject
>  BaseTools: Support UTF-8 string data in .utf8 files
>  BaseTools/CheckUnicodeSourceFiles: Verify .utf8 string files
>  BaseTools/UniClassObject: Verify string data is 16-bit
>  BaseTools/Tests: Verify 32-bit UTF-8 chars are rejected
>  BaseTools/Tests: 32-bit unicode chars are allowed in comments
>  OvmfPkg/PlatformDxe: Convert Platform.uni to .utf8
> 
> BaseTools/Conf/build_rule.template                |   2 +-
> BaseTools/Source/Python/AutoGen/UniClassObject.py |  21 +++-
> BaseTools/Source/Python/Common/EdkLogger.py       |   9 +-
> BaseTools/Tests/CheckUnicodeSourceFiles.py        | 128 ++++++++++++++++++++++
> BaseTools/Tests/PythonToolsTests.py               |   4 +-
> BaseTools/Tests/RunTests.py                       |   2 -
> BaseTools/Tests/TestTools.py                      |   9 +-
> OvmfPkg/PlatformDxe/Platform.inf                  |   2 +-
> OvmfPkg/PlatformDxe/Platform.uni                  | Bin 3298 -> 0 bytes
> OvmfPkg/PlatformDxe/Platform.utf8                 |  38 +++++++
> 10 files changed, 206 insertions(+), 9 deletions(-)
> create mode 100644 BaseTools/Tests/CheckUnicodeSourceFiles.py
> delete mode 100644 OvmfPkg/PlatformDxe/Platform.uni
> create mode 100644 OvmfPkg/PlatformDxe/Platform.utf8
> 
> -- 
> 2.1.4
> 
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y 
> <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to