我是在DELPHI读取控件属性时将之转换 未用外挂<br>使用方法<br>1.在单元的USES部分引用ABPubFormU单元,<br>2.修改窗体的继承为TABPubForm 就可以了<br><br>如下所示<br>function TABReader.NewReadWideString: WideString;<br>var<br> L: Integer;<br> Temp: UTF8String;<br> tempStr1:string;<br>begin<br> if NextValue in [vaString, vaLString] then<br> Result := ReadString<br> else<br> begin<br> L := 0;<br> case ReadValue of<br> vaWString:<br> begin<br> Read(L, SizeOf(Integer));<br> SetLength(Result, L);<br> Read(Pointer(Result)^, L * 2);<br> end;<br> vaUTF8String:<br> begin<br> Read(L, SizeOf(Integer));<br> SetLength(Temp, L);<br> Read(Pointer(Temp)^, L);<br> Result := Utf8Decode(Temp);<br> end;<br> else<br> raise EReadError.CreateRes(@SInvalidPropertyValue);<br> end;<br> end;<br> //此处对DELPHI读出的字串进行处理,进行翻译<br> tempStr1:=ABWideStringToString(Result);<br> result :=ABLanguage.Chinese.TransitionChineseInReadPropertys(PropName,tempStr1);<br> <br>end;<br><br>如需要可提供EXE的示例