--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> -
> > FWIW I get similar results trying to use single byte high ascii values in 
> > your scriptlets where you have dbcs. e.g., copyright symbol ©
> > 
> > Don't know if these problem are somehow related to documented limitations 
> > on variable names (which can only have alphanumerics and underscores).
> 
> 
> My suspicion is it happens when PowerPro is processing strings one char at a 
> time and inadvertently serparate a lead byte from its following.  For 
> example, in writing the ini file, PowerPro does one byte at a time to do 
> translations of \r and other hex characters.
> 
> I'm afraid I am not interested in trying to fix these at this time.
>

That's fine, but I'm using 4906 that predates any dbcs mods on US English 
Windows. BTW, control characters like \r, \n, \t, etc., are below 127 (so 
couldn't be lead bytes in dbcs) and also below 40 (so couldn't be trail bytes 
in dbcs).

s1.write crashes powerpro if there are any characters with decimal values above 
127. The separate issue for inputdefault with vector for autocomplete: any 
characters over 127 end up with a substitute character in the corresponding 
combobox. E.g, an accented à becomes an a.

s1.read and class.readstruct work ok with characters having decimal values 
above 127.

Using the file plugin to write the structure ini avoids the crash problem.

e.g.:

createteststruct()
local str1=class.readstruct(scriptfolder++?"\output.ini")
win.debug(str1.var2)
quit
; -------------------------------------------
Function createteststruct()
Local str1 = Class.MakeStruct("var1 var2", "init1", "init2")
str1.var2="£"
;str1.write(ScriptFolder ++ ?"\output.ini") ;; powerpro crashes
;alternate write:
local inistr="[newvar]\r\n"
for each word myWord in str1.variables
inistr++=myword++"="++eval("str1."++myword)++"\r\n"
endfor
file.writeall(ScriptFolder ++ ?"\output.ini",inistr)
;do(ScriptFolder ++ ?"\output.ini")
quit
; -------------------------------------------

Regards,
Sheri

Reply via email to