9 Replies Latest reply on Dec 7, 2013 9:39 AM by Laubender

    Trying to remove mass text anchors

    pestulio07

      Hello all,

       

      At my job we clean up files created by various clients. For one client (and only one...) every file we get from them is filled with what looks like text anchors when we turn on "show hidden characters". They cannot be hilighted, and sometimes there can be anywhere from 2 to 6 of them in a row.

       

      If we don't remove them, it causes problems for the next step in our process, and manually removing them can take a long time. Does anyone know of a fast way to find/delete these?

       

      We primarily use InDesign CC, but we also have tried this on Id CS5, CS5.5, and CS6.

       

      Below is an example of what we see when this happens. I wasn't able to recreate the issue, I simply copy/pasted, and re-typed around it.

       

      Testing.jpg

        • 1. Re: Trying to remove mass text anchors
          Joel Cherney Adobe Community Professional & MVP

          I think you can grep search for ~I (that's uppercase i) and replace with nothing.

           

          ...

           

          Huh, you can't.

           

          Well, I bet it depends on what they are - ID uses the same symbol for text anchors, bookmarks, et cetera. A bad idea, I think. I'd suggest opening the Hyperlinks panel, clicking on the flyout menu, choosing Hyperlink Destintations, and seeing if there is anything there - you can whack Delete repeatedly and maybe cleanse your document that way.

          • 2. Re: Trying to remove mass text anchors
            Peter Spier Most Valuable Participant (Moderator)

            Try a TEXT search for <FEFF> which is the code for a merge field marker, which get's mis-identified as ~I in the GREP find if you paste one in.

            • 3. Re: Trying to remove mass text anchors
              pestulio07 Level 1

              Hoooly cow it worked! You just made everyone in my office so happy

              • 4. Re: Trying to remove mass text anchors
                Joel Cherney Adobe Community Professional & MVP

                Nice one, Peter! I'll be using that one in the future.

                 

                Is that worth a bug report, do you think? It kinda bugs me that there is a metacharacter for both ordinary text search and GREP that fails to find the thing it identifies in the case of, holy cow, three or dfour different types of marker?

                • 5. Re: Trying to remove mass text anchors
                  Peter Spier Most Valuable Participant (Moderator)

                  You guys can thank Uwe Laubender (who told me about this the other day in http://forums.adobe.com/thread/1341730?start=40&tstart=0) and Jean-Claude Tremblay who posted about it in the scripting forum some time ago.

                   

                  By the way, if the files are data merges, you might want to read that other thread thoroughly. Theres a lot of really good stuff we worked out for cleaning up a merge, and Uwe did a script, to boot, to merge the records into a single story after the merge.

                  • 6. Re: Trying to remove mass text anchors
                    Peter Spier Most Valuable Participant (Moderator)

                    You can report it as a bug if you want, Joel, but apparently it's been around (and known) for a long time, so I doubt it's going to be a high-priority fix, especially with the text workaround.

                    • 7. Re: Trying to remove mass text anchors
                      Laubender Adobe Community Professional & MVP

                      @Joel – hm… Is it a bug?

                      Several bugs there, I think.

                       

                      Of course, it depends on the definition of the term "bug".

                       

                      Let's see:

                       

                      1. Injecting a special character (the dreaded <FEFF>) in a data merged document every time when an empty "slot" in the used CSV file is present. I think we have strong evidence for that. Feature or bug? I tend to see that as a bug. A new character is introduced where no character should be present.

                       

                      2. Copy/Paste <FEFF> to the GREP search fiels and getting not \x{FEFF} but ~I is a bug.

                      Is that ~I a HAIR SPACE character? No. It's not… A hair space character would be: ~| (the character after the tilde is a pipe).

                       

                      3. Searching for \x{FEFF} in GREP does not find the <FEFF> character. Perhaps no bug, just a limitation of the GREP implementation in InDesign

                       

                      4. The same goes for the special character <0016> that represents a table object in a story:

                      A GREP defined as \x{0016} cannot find it, but TEXT search is able to do so.

                       

                      5. The case of the injected XML tags right after a data merge. Not discussed here, and not a common problem. As far as I can see only two users here around are affected. We still don't know why this would happen. We can work around it, but don't know the  culprit. So it is open to consider this a bug…

                      • 8. Re: Trying to remove mass text anchors
                        [Jongware] Most Valuable Participant

                        On 3.: (Not behind my computer now, can't test)

                         

                        Doesn't the alternative notation \u{FEFF} work either?

                         

                        On "why" it does not work: as Peter Kahrel once stated, InDesign's GREP was not written from scratch by Adobe, but just uses the open source library "boost". Possibly, this library knows that the Unicode entity U+FEFF is INVALID and so removes it from any GREP string.

                         

                        InDesign's 'native' text format is based on Unicode, but uses a number of valid and invalid codepoints for its own purposes (most notably, the U+0007 and U+0008, but there are others as well); "Table", "Row" and "Cell" also have "internal" codes). Without special handling, which Adobe's programmers team used the tilde ~ notation for, GREP would not recognize *any* of ID's own stuff.

                         

                        .. When I found out that I could search for tables with <0016>, I was warned not to use this because it was "undocumented" and we should wait for Adobe to implement a "Table" wildcard in the Search Field.  Any progress on that?

                        • 9. Re: Trying to remove mass text anchors
                          Laubender Adobe Community Professional & MVP

                          @Jongware –  \u{FEFF} does not work. Just tested…

                           

                          Undocumented or not, searching for <0016> in the TEXT search is very efficient to find tables and nested tables. I'll stick with it ;-)

                           

                          Uwe