• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Make FindChangeByList work for accented characters

Enthusiast ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

In the current version, FindChangeByList does not recognize accented letters, like á, ü, ï etc.

GrepStyles do recognize these.

 

Does anyone know how to force the script to recognize the diacritical letters?

TOPICS
Scripting

Views

335

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Sep 02, 2020 Sep 02, 2020

Found it - the FindChangeList must be saved in Unicode (UTF-16). (rather than UTF-8, as mine was)

That solved all of my problems 🙂

Votes

Translate

Translate
Community Expert ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

You can use the unicode value of the character that will work, something like the following

 

{findWhat:"\\x{00E1}"} for finding á character

 

Edit:- I also checked the accented character directly in the file and it works for me. My string is as follows

grep	{findWhat:"á"}	{changeTo:"Manan"}	{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}	Find all double spaces and replace with single spaces.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

Thanks for the unicode value-option! Feels very PC-ish for a Mac user 🙂

On the other hand - if your á is found... on what platform are you running InDesign?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

I am on a MAC

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

Hmmm, in that case, it might be be something in the encoding of my file or a system setting. Thanks for your effort! I'm gonna investigate this in depth.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

Yes encoding is the right track i would go. What you do is place a break point in the script or better comnent out the lines that reset the find/change value to null. This way you can check what values InDesign is receiving on opening the Find/Change dialog. This would help your debugging

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

LATEST

Found it - the FindChangeList must be saved in Unicode (UTF-16). (rather than UTF-8, as mine was)

That solved all of my problems 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines