Other PDF Issues

Fix Special Characters in Acrobat app.response JavaScript

Huda QurayshiHuda Qurayshi Nov 3, 2026 869 views

Question details

The user needs to fix an issue where accented or special characters display incorrectly in an Adobe Acrobat app.response dialog when the script is run from an external JavaScript file.

Fix Special Characters in Acrobat app.response JavaScript
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Executing a folder-level external JavaScript file containing special characters to trigger a prompt dialog in Acrobat.
Observed behavior
Accented characters display correctly when the JavaScript is embedded directly into the document, but appear garbled or incorrect when stored in an external folder-level file.
Before you start

Ensure you have access to a capable external text editor (such as Notepad++, BBEdit, or Visual Studio Code) that allows you to view and manually adjust the character encoding of your script files.

Solution 1Recommended

Change the External JavaScript File Encoding to UTF-8

Converting your external JavaScript file to UTF-8 ensures that Adobe Acrobat correctly interprets and renders special accented characters.

When Acrobat executes a folder-level script, it relies on the external file's encoding to read characters. If your text editor defaults to ANSI or another localized encoding system, special characters in the app.response prompt will appear garbled. Adobe Acrobat natively supports Unicode strings, provided the file itself is saved properly.

1
Open the JavaScript file

Right-click your external folder-level .js file and open it using a robust text editor like BBEdit (Mac) or Notepad++ (Windows).

2
Locate encoding options

Look for the 'Encoding' menu item at the top of the editor, or check the document properties displayed in the bottom status bar.

3
Convert to UTF-8

Select the option to 'Convert to UTF-8'. If your editor offers multiple UTF-8 options, choose 'UTF-8 without BOM' (Byte-Order Mark) to ensure maximum compatibility with Acrobat's JavaScript engine.

4
Correct corrupted characters

Scan your script for any characters that may have been permanently corrupted during previous saves, and manually re-type the correct accented characters in your app.response strings.

5
Save and test

Save the file, restart Adobe Acrobat to force it to reload the folder-level scripts, and trigger your script to verify the dialog displays correctly.

Change the External JavaScript File Encoding to UTF-8
Acrobat's Built-in Editor: Acrobat's built-in script editor handles Unicode encodings automatically. This encoding issue typically only occurs when scripts are created outside of Acrobat.
Free Microsoft Office alternative

Experience a Lighter, Faster PDF and Office Suite

Dealing with complex script configurations in heavy PDF editors can be frustrating. Try WPS Office, a comprehensive, free, and lightweight alternative that includes powerful PDF reading and editing tools alongside robust Word, Excel, and PowerPoint alternatives. Enjoy seamless format compatibility and a familiar, easy-to-use interface.

Fully compatible with standard PDF formats and Microsoft Office files.Lightweight installation with incredibly fast loading times.Built-in powerful PDF reader, editor, and conversion tools.Familiar user interface requiring no steep learning curve.Cross-platform support for Windows, Mac, iOS, and Android.
microsoft office alternative - wps office

Frequently Asked Questions

Why do accented characters work in document-level scripts but not folder-level scripts?

Document-level scripts are saved within the PDF document itself, and Adobe Acrobat automatically manages the internal character encoding. Folder-level scripts are stored as external files on your computer, making their encoding entirely dependent on the default settings of the text editor used to create them.

What is the difference between UTF-8 and UTF-8 with BOM?

BOM (Byte Order Mark) is a hidden marker at the very beginning of a file that indicates the text is Unicode. Some specific Acrobat versions or script engines might misinterpret the BOM as a syntax error. Saving as 'UTF-8 without BOM' prevents this issue while keeping the characters intact.

Can I use Acrobat's built-in editor to write folder-level scripts?

Acrobat's built-in JavaScript editor is designed for document-level, field-level, and action scripts. Folder-level scripts require you to create external .js files and place them in the application's JavaScript directory, which necessitates using a third-party text editor.