Re: replace with Unicode code point
Eric Le Lay via jEdit-users <[email protected]>
| Newsgroups | gmane.editors.jedit.user |
|---|---|
| Message-ID | <[email protected]> |
Le Fri, 03 Nov 2017 18:09:31 -0400, maxwell <[email protected]> a écrit : > I'm trying to use regex's that include Unicode code points in both > the search and the replace parts. It works fine for search, but not > for replace. > > Specifically, I can enter the sequence > \x{016B}\x{0304} > in the "Search for" box in the "Search and Replace" dialog box, or > equivalently > \u016B\u0304 > and it finds the characters (ū̄) correctly. (FWIW, this is a > pre-composed u+macron followed by a combining macron, which is of > course redundant...which is why I'm trying to replace it.) > > If I then enter the string > \x{016B} > or equivalently > \u016B > in the "Replace with" box in that same "Search and Replace" dialog > box, I would expect the search string in the buffer to be replaced by > ū > But instead it gets replaced by > u016B > I would consider this a bug. If Unicode code points work in the > Search box, they should also work in the Replace box. > > Before I submit a bug report, though, I want to find out whether I'm > doing s.t. wrong. I do of course have the "Regular expressions" box > checked in the dialog box (else the search wouldn't work). Does > anyone have any suggestions? Or a reason why this is a feature > rather than a bug. > > (...) > Mike Maxwell > Hi Mike, Choosing to replace with a **beanshell snippet** rather than **text** and surrounding the replacement with double quotes ("\u016B") works. Cheers, ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot -- ----------------------------------------------- jEdit Users' List [email protected] https://lists.sourceforge.net/lists/listinfo/jedit-users