C# 获取CorelDRAW文件里文字物件里的字,中文是乱码(像是类似韩文的字),英文和数字可以正常显示,求大神指点如何能正确获取中文。
using CorelDRAW;//引用CorelDRAW.dll
代码简化内容如下
CorelDRAW.Application cdr = new CorelDRAW.Application();
cdr.Visible = true;
cdr.Open(@"F:\45-46版.cdr");
CorelDRAW.Shapes clsShapes = cdr.ActiveDocument.ActivePage.ActiveLayer.Shapes;
foreach (Shape mShape in clsShapes)
{
switch (mShape.Type)
{
case cdrShapeType.cdrTextShape://文本物件
string strCdrContent = mShape.Text.Contents.Trim();
break;
return;
}
}
strCdrContent 里面 中文是 类似韩文的乱码 英文数字可以正常显示 ,求 解决