点击或拖拽改变大小

FanucSeries0iTextEncoding 属性

获取或设置当前的文本的字符编码信息,如果你不清楚,可以调用ReadLanguage方法来自动匹配。
Get or set the character encoding information of the current text. If you are not sure, you can call the ReadLanguage method to automatically match.

命名空间:  HslCommunication.CNC.Fanuc
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.9.1.0 (12.9.1.0)
语法
public Encoding TextEncoding { get; set; }

属性值

类型:Encoding
备注
如果跨平台的.net Core3.1/5/6/7/8/9/10 读取报警等发生字符串乱码的情况,从nuget安装 System.Text.Encoding.CodePages
然后调用 Encoding.RegisterProvider( CodePagesEncodingProvider.Instance );
然后设置本属性 TextEncoding = Encoding.GetEncoding( "GB2312" );
参见