开发者

Searching for unicode surrogates in Acrobat Pro using javascript

I wanted to search for Japanese text using the Acrobat Javascript API (search.query). Everything works fine except for the code range 0xD800~0xDFFF (Unicode surrogate code points). I have tried copy and pasting the text I want to search for into my .js file and have also tried entering the surrogate code points, in either case they appear as a "." in the search window.

Here are my questions:

  1. Why does the text appear as a dot in Acrobat?
  2. Is there any way to search for surrogates through Acrobat Javascript?

Edit: More infor开发者_如何学Pythonmation: In Acrobat, hit "Ctrl+J" to launch the debugger and type

search.query("\uDBCE\uDE2F", "ActiveDoc"); 

and hit "Ctrl+Enter". You should see two dots (i.e., "..") in the search window (at least with Acrobat 9). The peculiar thing is that, if you type

app.alert("\uDBCE\uDE2F");

it displays the character (a box) that I want to search for.


Have you tried entering correct pairs of surrogates? Stand-alone code units in the surrogate area don't make any sense, and can't be rendered. Nothing to with Acrobat.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜