我有一个带有Unicode文本的字段“数据”,可以正常显示。我想复制一大块并将其放入另一个名为“someData”的字段中。
我在按钮中尝试了以下脚本
on mouseUp
put word 2 of line 1 of the unicodeText of field "data" into t
set the unicodeText of field "someData" to t
end mouseUp
非Unicode文本在“someData”字段中显示正常,但Unicode文本不显示。
答案 0 :(得分:1)
您可能可以使用UTF8编码然后解析然后重新编码
on mouseUp
put word 2 of line 1 of uniDecode(the unicodeText of field "data","UTF8") into t
set the unicodeText of field "someData" to uniEncode(t,"UTF8")
end mouseUp
答案 1 :(得分:1)
on mouseUp
put unicode the unicodeText of word 2 of field "data" into field "someData"
end mouseUp
应该有用。
马立克
答案 2 :(得分:0)
我不是unicode的专家,但可能有一个线索,即LC将大多数unicode东西视为属性。因此,可以设置一个字段的uniCodeText:
set the unicodeText of fld 1 to "U+400"
但是无法在变量中设置该属性或任何属性。考虑以下两个处理程序。假设存在两个字段,“fld 1”和“fld 2”。
on mouseUp
set the useUnicode to "true"
set the unicodeText of fld 1 to "U+400" -- an example
set the unicodeText of fld "f2" to the uniCodeText of fld 1
end mouseUp
on mouseUp
set the useUnicode to "true"
set the unicodeText of fld 1 to "U+400"
put fld 1 into temp
set the unicodeText of fld "f2" to temp
end mouseUp
第一部作品,第二部作品没有。在您的示例中,您尝试将显示的uniCode放入变量中。我认为你不能“放”那种东西。你必须设置一个属性。
现在说,看看“put uniCode”命令。这可能会解决财产问题。如果有,请回信。
克雷格纽曼答案 3 :(得分:0)
这是你可以测试的另一个单行:
set the unicodeText of field 2 to the unicodeText of word 2 of field 1