Unicode 为什么中文单词在monotouch/ios7中是混乱的

Unicode 为什么中文单词在monotouch/ios7中是混乱的,unicode,xamarin.ios,xamarin-studio,Unicode,Xamarin.ios,Xamarin Studio,ios7/xamarin studio 4.3/monotouch7.2: 这只是一个简单的静态方法,返回人类可读的消息,但为什么在monotouch/ios7(在调试观察窗口和iphone UI中)中中文单词混乱 我已附上iPhone快照, 并上传了项目解决方案文件,请从以下网站下载: 谢谢你的帮助 源代码是: public static string GetMsg() { //btw, this file was edited in microsoft v

ios7/xamarin studio 4.3/monotouch7.2:

这只是一个简单的静态方法,返回人类可读的消息,但为什么在monotouch/ios7(在调试观察窗口和iphone UI中)中中文单词混乱


我已附上iPhone快照, 并上传了项目解决方案文件,请从以下网站下载:

谢谢你的帮助

源代码是:

     public static string GetMsg()
    {
        //btw, this file was edited in microsoft visual studio 2013 
        //and shared to mac to compile&debug
        //(my business logic code is edit by vs2013)

        return "Please input mobileNo, chinese words is(but incorrect to display):" + "请输入手机号";  
    }


    public override void ViewDidLoad()
    {
        base.ViewDidLoad();

        string msg = TestLib.TestClass.GetMsg();
        UIAlertView alertDialog = new UIAlertView("", msg, null, "OK");
        alertDialog.Show();
    }

更新

原来是源文件编码(ISO-8859)和UTF8

提示是,将代码复制到另一个文件可以使此工作如预期的那样

原创

我不确定Xamarin Studio调试器是否可用(可能是另一个问题),但这应该适用于iPhone用户界面

您是否已将其他I18N程序集包括在项目选项中


如果是这样,请提交一份错误报告(并附上一个示例应用程序),这样我们就可以了解为什么UI不能正确显示在您的应用程序中。

我已将源代码上传到url:pan.baidu.com/s/1o69G8xs感谢您的帮助。谢谢。我发现vs2013中创建的源代码文件位于GB2312/936中,因此在mac/xamarin中无法正常工作。当我转换到UT8-8/65001时,它可以按预期工作。但我建议xamarin团队可以改进它:xamarin studio可以自动转换它。因为我的团队成员在vs2013中编写逻辑代码,其他人编写ui代码并在mac中编译(通过SVN共享代码)。我已向xamarin团队报告。目前我将手动转换源代码文件endcoding(VS 2013=>file=>Advanced save option=>Unicode)。