Highlighted

Make FindChangeByList work for accented characters

Participant ,
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?

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

That solved all of my problems 🙂

TOPICS
Scripting

Views

46

Likes

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

Make FindChangeByList work for accented characters

Participant ,
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?

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

That solved all of my problems 🙂

TOPICS
Scripting

Views

47

Likes

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
Sep 02, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Sep 02, 2020 1
Participant ,
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?

Likes

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
Reply
Loading...
Sep 02, 2020 0
Adobe Community Professional ,
Sep 02, 2020

Copy link to clipboard

Copied

I am on a MAC

-Manan

Likes

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
Reply
Loading...
Sep 02, 2020 1
Participant ,
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.

Likes

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
Reply
Loading...
Sep 02, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Sep 02, 2020 1
Participant ,
Sep 02, 2020

Copy link to clipboard

Copied

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

That solved all of my problems 🙂

Likes

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
Reply
Loading...
Sep 02, 2020 0