如何将Chameleon模拟器的字符编码转换为默认为'latin-1'的'Utf-8'?

时间:2013-03-12 11:25:31

标签: utf-8 hl7

我想在变色龙模拟器上模拟日语HL7消息。但是当我从文件中选择该消息时,日语字符被显示为Chameleon模拟器中的特殊字符。我希望它显示为日文字符。

如何将Chameleon模拟器的字符编码转换为默认为'latin-1'的'Utf-8'?

1 个答案:

答案 0 :(得分:1)

在收到消息之前,请尝试:

ChameleonEncoding.SetCurrentTranslationLocale("utf-8");  // Tell Chameleon to use current Chameleon Locale

或者您可以使用本地区域设置:

 _currentLocale = ChameleonEncoding.GetCurrentTranslationLocale();   // Get the current Chameleon Locale
 ChameleonEncoding.SetCurrentTranslationLocale(_currentLocale);      // Tell Chameleon to use current Chameleon Locale