diff --git a/README.md b/README.md index 5393af0..5dff7b9 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ Note, everything that is supported in Python is supported by C# API as well. C# ```csharp using System; +using System.Text; using BlingFire; namespace BlingUtilsTest @@ -193,6 +194,8 @@ namespace BlingUtilsTest { static void Main(string[] args) { + Console.OutputEncoding = Encoding.UTF8; + // load XLM Roberta tokenization model var h = BlingFireUtils.LoadModel("./xlm_roberta_base.bin"); diff --git a/nuget/readme.md b/nuget/readme.md index 9a463ea..9f08fb9 100644 --- a/nuget/readme.md +++ b/nuget/readme.md @@ -49,7 +49,6 @@ Model handle: 94403233096000 'Au-topho-bia' ',' 'al-so' 'called' 'mono-pho-bia' ',' 'iso-lopho-bia' ',' 'or' 'e-re-mopho-bia' ',' 'is' 'the' 'spe-ci-fic' 'pho-bia' 'of' 'iso-la-tion' '.' 'I' 'saw' 'a' 'girl' 'with' 'a' 'te-le-s-cope' '.' 'Я' 'уви-дел' 'де-ву-шку' 'с' 'те-лес-ко-пом' '. ' Test Complete ``` -Note: In Windows console default encoding is set to something old so only ascii symbols will be printed, but this is a display issue. You can manually set it to use UTF-8 if you want proper output. After changes were made to the nuget package, to create a new NuGet package run from the lib folder (here use Release configuration since we are going to publish it): ``` diff --git a/nuget/test/Program.cs b/nuget/test/Program.cs index 774b00b..24ccaba 100644 --- a/nuget/test/Program.cs +++ b/nuget/test/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Text; using BlingFire; namespace BlingUtilsTest @@ -9,6 +10,7 @@ static void Main(string[] args) { Console.WriteLine("Start C# test..."); + Console.OutputEncoding = Encoding.UTF8; // see the version of the DLL Console.WriteLine(String.Format("Bling Fire version: {0}", BlingFireUtils.GetBlingFireTokVersion()));