Mono osx warns about non-7-bit characters interpreting with macOS Roman encoding

I downloaded and installed the latest MONO MDK for OSX, I tried to run the C # demo program like this:

using System;
using System.Windows.Forms;

public class HelloWorld : Form
  {
     static public void Main ()
     {
        Application.Run (new HelloWorld ());
     }

     public HelloWorld ()
       {
          Text = "哈įž…您åĨŊ";
          // Text = "Hello Mono World";
       }
}

      

I did mcs hello.cs -pkg: dotnet mono hello.exe

But I am getting unreadable Chinese characters and the following warning is displayed on the console: 2014-12-02 17: 49: 04.156 mono [1719: 240393] WARNING: CFSTR ("\ 37777777745 \ 37777777623 \ 37777777610 \ 37777777747 \ 37777777676 \ 37777777746 \ 3777 37777777602 \ 37777777650 \ 37777777745 \ 37777777645 \ 37777777675 ") has not-7 bits, interpretation using MacOS Roman encoding now, but that will change. Please exclude non-7 bit characters (including escaped characters above \ 177 octal) in CFSTR ().

Can anyone help me display the correct Chinese characters? Do I need to install something? Thank.

PS If the code

Text = "Hello Mono World";

      

then it works without warning.

+3


source to share





All Articles