Xamarin 中的国际化编码Internationalization Encodings in Xamarin.iOS

默认情况下,并非所有编码都包含在 Xamarin 类库中。Not all encodings are included in the Xamarin.iOS class library by default.

为了减小应用程序的大小,Xamarin 不包括任何特定的编码,并且必须指示 mtouch 包含包含所需编码支持的程序集。To reduce the size of the application, Xamarin.iOS doesn't include any specific encoding, and you have to instruct mtouch to include the assemblies containing the support for the encoding you need.

这是通过在 Visual Studio for Mac 或 Visual Studio 中的 "iOS 生成"/"高级" 窗格中选择额外的编码来完成的:This is done by selecting the extra encodings from the iOS Build/Advanced pane in Visual Studio for Mac or Visual Studio:

您可以选择以下其中一项:You can select one of these:

  • cjk: for Chineese,日语和韩语cjk: for Chineese, Japanese and Korean
  • mideast:阿拉伯语、希伯来语、土耳其语和 Latin5。mideast: Arabic, Hebrew, Turkish and Latin5.
  • 其他:西里尔语、波罗的语、越南语、乌克兰语和泰语other: Cyrillic, Baltic, Vietnamese, Ukrainian and Thai
  • 罕见: EBCDIC 编码和其他罕见代码页rare: EBCDIC encodings and other rare code pages
  • 西部:拉丁语语言、复活节和西欧west: Latin languages, Easter and Western European
  • 全部all

cjkcjk

  • CP51932CP51932
  • CP932CP932
  • CP936CP936
  • CP949CP949
  • CP950CP950
  • CP54936CP54936

mideastmideast

  • CP1254CP1254
  • CP1255CP1255
  • CP1256CP1256
  • CP28596CP28596
  • CP28598CP28598
  • CP28599CP28599
  • CP38598CP38598

其他other

  • CP1251CP1251
  • CP1257CP1257
  • CP1258CP1258
  • CP20866CP20866
  • CP21866CP21866
  • CP28594CP28594
  • CP28595CP28595
  • CP57002CP57002
  • CP874CP874

极少数rare

  • CP1026CP1026
  • CP1047CP1047
  • CP1140CP1140
  • CP1141CP1141
  • CP1142CP1142
  • CP1143CP1143
  • CP1144CP1144
  • CP1145CP1145
  • CP1146CP1146
  • CP1147CP1147
  • CP1148CP1148
  • CP1149CP1149
  • CP20273CP20273
  • CP20277CP20277
  • CP20278CP20278
  • CP20280CP20280
  • CP20284CP20284
  • CP20285CP20285
  • CP20290CP20290
  • CP20297CP20297
  • CP20420CP20420
  • CP20424CP20424
  • CP20871CP20871
  • CP21025CP21025
  • CP37CP37
  • CP500CP500
  • CP708CP708
  • CP852CP852
  • CP855CP855
  • CP857CP857
  • CP858CP858
  • CP862CP862
  • CP864CP864
  • CP866CP866
  • CP869CP869
  • CP870CP870
  • CP875CP875

西部west

  • CP10000CP10000
  • CP10079CP10079
  • CP1250CP1250
  • CP1252CP1252
  • CP1253CP1253
  • CP28592CP28592
  • CP28593CP28593
  • CP28597CP28597
  • CP28605CP28605
  • CP437CP437
  • CP850CP850
  • CP860CP860
  • CP861CP861
  • CP863CP863
  • CP865CP865