Substituting unicode.new(str) for str as an argument to a method or put/get works for me. However, I've been tinkering with my code, so maybe I fixed something since 0.70. Try comPlugin0.72_091125.zip in the usual
http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/ If comPlugin0.72_091125 doesn't work, try to modify comPluginDemoScriptFileSysObjDotSyntax.powerpro (first ensuring it works okay on your system). line 26 local objFile = objFSO.OpenTextFile(sFN, 2 ,1) becomes local objFile = objFSO.OpenTextFile(unicode.new(sFN), 2 ,1) line 33 becomes local objFolder = objFSO.GetFolder(unicode.new(scriptfolder)) Work or not? Meanwhile, what about strings returned as results of methods or get? One possible route: strings are always returned from COM operations as WCHAR* (BSTR, same thing). Until now always converted to ANSI. Instead I can inspect WCHAR* string for any WCHAR > 255, which can't be stored in a CHAR* string. If any found, return a handle to a unicode string instead (providing user has unicode plugin installed). No user control, it's just done. Whatya think? --- In [email protected], "Sheri" <sheri...@...> wrote: > > -- As yet not documented, cause I haven't tested it, but you > > shold be able to use handle to a unicode string as an argument to > > any get, put or method call. > > Does not seem to be working. E.g., the fourth argument below is a unicode > handle, but instead of the content of the handle, the handle label > "u\x05_3001" is being processed. > r=myselect.Search(v[i,1],wholeword,casesensitive,unicode.new(v[i,2])) > Just in case the unicode handle needed to be held in a variable, I also tried > pre-assigning uh=unicode.new(v[i,2]) and using uh for the argument. No > improvement. > > Regards, > Sheri >
