Sorted it. The only way for it to work with extra text on either end is to move all the single entity codes (e.g. 👦) below the multiple entity ones (e.g. 👦🏻) in the canonize file.
So it would look something like this... 👦🏻 ӧ🏟 ҁ 👦 👧 👨 On Sunday, 10 April 2022 at 20:48:51 UTC+1 Justin Ross wrote: > Hi all, I'm looking for a way to catch any emoji that's used amongst > regular text. This is so that I can create an XML file to import into > InDesign. Then I simply find/replace any emoji found and convert the > character to an emoji font so it can be printed. > > I've made a canonize file with over 1,000 emoji, separated by a tab, then > the decimal equivalent. > > This works great. > > *For example:* > This emoji is found in the text somewhere: > 👦 > > and is changed to: > 👦 > > It also works for skintone emoji where the decimal code can be repeated. > > This emoji is found in the text somewhere: > 👦🏻 > > and is changed to: > 👦🏻 > > > However, as soon as I wrap the code (so it's easier to find/change in > InDesign), the duplicate codes cause a problem. > > For example: > > This emoji: > 👦 > > Is changed to this: > (ef)&\#128102;(\ef) > > *BUT...* > > This: > 👦🏻 > > Is changed to this: > (ef)👦(\ef)(ef)🏻(\ef) > > Note the extra (\ef)(ef) in the middle. > > Now I could use a find/replace to remove that bit. But what if there are > two different emoji next to each other? I'm replacing one problem with > another. > > Is there a way round this? > > Many thanks if anyone can help. > > -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/f83f6fed-8197-4823-868d-7686c5c02af6n%40googlegroups.com.
