--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > 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/ >
Works now. Bravo! > 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? At this point have only retried my original script (including a few alternate unicode flourishes). > > 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? > I need to give this some thought. Checking for WCHAR > 255 sounds good, but possibly (usually?) adds unnessary overhead. Maybe the behavior should continue to default to existing ANSI/string conversion. If the user wants it in unicode, could the user somehow provide a unicode handle? Something similar to what we do to get a vector filled by the regex plugin? Regards, Sheri
