Skip to main content
Participating Frequently
November 24, 2021
Question

Delete unicode character 0xFEFF

  • November 24, 2021
  • 8 replies
  • 6189 views

Hello

Do you know how to delete this character 0xFEFF (ZERO WIDTH NO-BREAK SPACE) between two letters. When I copy-past it in find-change dialog box, it appears like an index tag (~I in GREP). But when I search it, only index tags are find.

 

 

Thanks

Laurent

8 replies

Participant
March 23, 2022

This saved me a ton of time today. 3397 instances of "<feff>X" removed by "magic" 

Thanks a lot for sharing here.

Community Expert
November 24, 2021

But also note that <FEFF> special characters are also used for other purposes.

InDesign Note objects for example. Or hyperlink anchor markers:

 

Regards,
Uwe Laubender

( ACP )

Participating Frequently
November 24, 2021

Thanks for this presentation of the character.

Best

Community Expert
November 24, 2021

Hi Laurent,

your screenshot is clearly showing an FEFF special character between the R and the A.

 

You could try to shield all index markers from your search if you first apply a character formatting to all index tags that is unique to your text. Perhaps a character width of 50%. Then in a second search  you are looking for a character with pattern <FEFF> plus a character width of 100%.

 

TEXT Find pattern for index markers:

^I

 

Regards,
Uwe Laubender

( ACP )

Participating Frequently
November 24, 2021

Great idea. You are resolved the problem. 

A tip to keep in mind.

Best

Laurent

vladan saveljic
Inspiring
November 24, 2021

"But I wan't te delete only space, not index tag"

FEFF is 0 width space

Legend
November 24, 2021

FEFF is a special code, just in case you did not know.

Because it has no effect, it is used for a special meaning. It is included at the start of many, perhaps most Unicode files. Apps can see that a file starts with hex FFFE (UCS2-BE) or FEFF (UCS2-LE) or  EFBBBF (UTF-8) - all of which are U+FEFF - and know it is Unicode instead of plain text. You may often find it in your text, and it's probably best to ignore it.

Participating Frequently
November 24, 2021

Thanks.

But I wan't te delete only space, not index tag.

I think it is impossible.

Community Expert
November 24, 2021

FWIW:

<FEFF>

That's not a GREP Find/Change pattern, it's a TEXT Find Change expression.

 

Laurent,

also note that this special character is used for several applications.

So be careful what instants you want to remove.

 

Regards,
Uwe Laubender

( ACP )

vladan saveljic
Inspiring
November 24, 2021

If you don't need these characters in your text you can delet them with find-change.

Find: <feff>

change: leave empty