I am writing a js script for Acrobat. I spied in the API the possibility of adding my own (new) menu item, on which a function with the actions I need is then hung up. Everything is fine, but Cyrillic characters are not supported in the names of newly created items, with the Latin alphabet everything is ok. Clearly, this is how it works:
app.addSubMenu({ cName: "Test", cParent: "Help", nPos: 0})
//app.addMenuItem({ cParent: "Test", cName: "Punkt_menu1", nPos: 1, cExec: "Test()", cEnable: "event.rc = (event.target != null);"});
this does not work:
app.addSubMenu({ cName: "Тест", cParent: "Help", nPos: 0})
//app.addMenuItem({ cParent: "Тест", cName: "Пункт_меню1", nPos: 1, cExec: "Test()", cEnable: "event.rc = (event.target != null);"});
It's funny that inside the function itself it is possible to call dialog boxes, the titles of which also do not support the Cyrillic alphabet, but there they told me the way out, use the Unicode encoder. Let's say the word Hello looks like this - \ u041f \ u0440 \ u0438 \ u0432 \ u0435 \ u0442 in the code, and when the script is running, the word Hello is displayed. But, unfortunately, this does not work in the names of the menu items. I went from the opposite and wrote the word Hello in Cyrillic and the program recoded it as I.eaao
I tried to decode this word on many online decoders, but nothing came of it. Digging in the Acrobat's installation folders, I came across text files with many encodings, each of them has 3 columns of data HEX, Unicode (HEX) and a character associated with it. In general, the encoding did not work through HEX either, the name of the item looks just like a number.