Skip to main content
_AWID_
Inspiring
Jan 6, 2025 10:10 AM UTC
Answered

Correctly display umlauts in alerting messages

Hi.

I have successfully completed a script for InDesign. Now I just want to output a final message with the (dynamic) file name. Some of these files contain German umlauts (Ä, Ü, Ö). These and the spaces (not %20) should be displayed correctly in the warning message. How can I achieve this?

 

 

Regards

Peter Kahrel
Peter KahrelCorrect answer
Community Expert
Jan 6, 2025 12:53 PM UTC

Use  decodeURI(). So instead of myFileName, use decodeURI(myFileName)

4 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
Jan 6, 2025 12:53 PM UTC

Use  decodeURI(). So instead of myFileName, use decodeURI(myFileName)

Translate
_AWID_
_AWID_Author
Inspiring
Jan 6, 2025 12:59 PM UTC

Thanks Peter. That was what I was looking for 🙂

Translate
Willi Adelberger
Community Expert
Community Expert
Jan 6, 2025 10:56 AM UTC

I don't see problems with Umlaute but with the ordinary space.

Translate
_AWID_
_AWID_Author
Inspiring
Jan 6, 2025 12:09 PM UTC

 

Unfortunately there are still problems with umlauts. 😞
But only with the document name.

Translate