<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jari,<br>
<br>
you are right that using FCString() functions is preferred over Lua
functions.<br>
But it's not the non-FCString() functions that are causing the
problem in this case.<br>
It is (most probably) the CreateEnigmaStrings().<br>
<br>
I attached below the same script - this time with
FCString()-functions only.<br>
It's the same result: i.LuaString is empty when three or more
unicode characters are appended.<br>
<br>
Best regards,<br>
Jan<br>
<br>
function SplitEnigma(text)<br>
--Create enigma strings and print all non-enigma commands (i.e.
all texts)<br>
print("String to split:",text.LuaString)<br>
local splittext=text:CreateEnigmaStrings(true)<br>
for i in each(splittext) do<br>
if not i:IsEnigmaCommand() then<br>
print("String:",i.LuaString)<br>
end<br>
end<br>
end<br>
<br>
<br>
local text=finale.FCString()<br>
text.LuaString="^fontMus(Bravura,8192)^size(24)^nfx(0)"<br>
text:AppendCharacter(0xe050)<br>
SplitEnigma(text)<br>
<br>
text.LuaString="^fontMus(Bravura,8192)^size(24)^nfx(0)"<br>
text:AppendCharacter(0xe050)<br>
text:AppendCharacter(0xe050)<br>
SplitEnigma(text)<br>
<br>
text.LuaString="^fontMus(Bravura,8192)^size(24)^nfx(0)"<br>
text:AppendCharacter(0xe050)<br>
text:AppendCharacter(0xe050)<br>
text:AppendCharacter(0xe050)<br>
SplitEnigma(text)<br>
<br>
text.LuaString="^fontMus(Bravura,8192)^size(24)^nfx(0)"<br>
text:AppendCharacter(0xe050)<br>
text:AppendCharacter(0xe050)<br>
text:AppendCharacter(0xe050)<br>
text:AppendCharacter(0xe050)<br>
<br>
SplitEnigma(text)<br>
text.LuaString="^fontMus(Bravura,8192)^size(24)^nfx(0)"<br>
text:AppendCharacter(123)<br>
text:AppendCharacter(123)<br>
text:AppendCharacter(123)<br>
text:AppendCharacter(123)<br>
SplitEnigma(text)<br>
<br>
Running [Unnamed Script] ======><br>
String to split: ^fontMus(Bravura,8192)^size(24)^nfx(0)<br>
String: <br>
String to split: ^fontMus(Bravura,8192)^size(24)^nfx(0)<br>
String: <br>
String to split: ^fontMus(Bravura,8192)^size(24)^nfx(0)<br>
String: <font color="#ff0000">-- Empty !</font><br>
String to split: ^fontMus(Bravura,8192)^size(24)^nfx(0)<br>
String: <font color="#ff0000">-- Empty !</font><br>
String to split: ^fontMus(Bravura,8192)^size(24)^nfx(0){{{{<br>
String: {{{{<br>
<======= [Unnamed Script] succeeded (Processing time: 0.000 s).<br>
</body>
</html>