[JW Lua] FCCustomSmartLineDef.LineCharacter not ready for unicode - more code...

Jan Angermüller jan at angermueller.com
Tue Mar 31 16:01:05 CEST 2015


Jari,

here is a bit more on that topic. It seems that it's not only
a signed/unsigned issue, but something more.
I have a unicode character U+E15C (=57692 / -7844) as a line character.
If I set the same code (-7844) again and save it, the character will
disappear in Finale (or better: it will become an unrecognized character)
although the memory shows -7844 again.
So there must be a unicode issue somewhere.

This is the code:

local cdefs=finale.FCCustomSmartLineDefs()
cdefs:LoadAll()
for c in each(cdefs) do
      if c:GetLineCharacter()==-7844 then
         print("Old",c:GetLineCharacter())
         c:SetLineCharacter(-7844)
         c:Save()
         print("New",c:GetLineCharacter())
     end
end

If I write the positive value c:SetLineCharacter(57692)   instead,
the same thing happens: an unrecognized character appears.

Best regards,
Jan




More information about the JWLua mailing list