A really basic question, I'm afraid:
How does one enter a unicode code point into a PowerFind Pro or other RegEx enabled Find and Replace dialogue?
The purpose is to replace a given symbol from the emoji and symbols list, with a similar glyph in a specific font (music notation font), but which is at a different code point, but where copying and pasting in won't work.
Thanks
Mark
Entering UTF-8 code points in Find and Replace
Re: Entering UTF-8 code points in Find and Replace
G'day, Mark et al
As an example, the Unicode code for lowercase "t" is U+0074. You can determine this either from the System's Character Viewer or (once an instance of the character is selected) from Nisus Writer's Formatting Examiner.
The Find/Replace expression you want (in PowerFind Pro) is then "\U0074" (without the quotes).
Cheers,
Adrian
As an example, the Unicode code for lowercase "t" is U+0074. You can determine this either from the System's Character Viewer or (once an instance of the character is selected) from Nisus Writer's Formatting Examiner.
The Find/Replace expression you want (in PowerFind Pro) is then "\U0074" (without the quotes).
Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
macOS Ventura
Nisus Writer user since 1996
Re: Entering UTF-8 code points in Find and Replace
Hi Adrian,
That was the bit that I needed to know; thank you. Can I point out, though, that while "\Uxxxx" works in NWP, it fails in other regex-enabled apps like Scrivener which are also built on the same Apple TextKit. In Scrivener, the "u" must be lowercase, and I would suspect this to be more canonical.

Mark
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Entering UTF-8 code points in Find and Replace
You can also use \u0074 in Nisus Writer. But you're right that there are subtle variations in the regex dialect. Nisus Writer uses an open source regex engine, not the stock engine provided by Apple as part of macOS.
Re: Entering UTF-8 code points in Find and Replace
Thanks so much, Martin. I did know that /uxxxx works in NWP, but it has always puzzled me where the slight differences in the Scrivener RegEx implementation came from, e.g. \L to Lowercase a letter works in NWP, but not in Scrivener; now I know, so thank you. Can I ask which RegEx engine you use?

Mark
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Entering UTF-8 code points in Find and Replace
Re: Entering UTF-8 code points in Find and Replace
Thanks Martin. 
Mark

Mark