Thank you Charlie!
I tried nearly everything. I added "use utf8" as you suggested; I saved
the input file with every imaginable encoding (utf-16/8 with or without
BOM) - no help. The search of \x{D83D}\x{DE18} in BBEdit is working.
I discovered in the suggested perlunicode the possibility to look for
the official Unicode character name like \N{FACE THROWING A KISS} Not
working either :-(
Is the Perl guru Ronald in this group not any more? Somebody else taking
this challange?
Here again some attempts in my perl script:
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use charnames ':full';
# while(<>) {
#
s!\x{D83D}\x{DE18}!\\includegraphics[height=15pt]{/Users/mstep/Documents/private_txt/anette/pix/emo01.png}!g
# }
while(<>) {
foreach (/\x{0020}/g) {print "hurray!\n"}; # this is working! (Searches
for a space!)
}
# while(<>) {
# foreach (/\N{FACE THROWING A KISS}/g) {print "hurray! And here is your
emoticon!\n"}; # this is not working! (Searches for the emoticon 😘 !)
# }
# while(<>) {
# foreach (/😘/g) {print "hurray! And here is your emoticon!\n"}; # this
is not working!
# }
# while(<>) {
# foreach (/\x{D83D}\x{DE18}/g) {print "hurray! And here is your
emoticon!\n"}; # this is not working!
# }
while(<>) {
foreach (/\N{U+D83DDE18}/g) {print "hurray! And here is your
emoticon!\n"}; # this is not working!
}
# in BBEdit the search pattern \x{D83D}\x{DE18} for the emoticon was working
# hexdump is giving U+D83D U+DE18
On 19/12/14 01:57, Charlie Garrison wrote:
...
>
> use utf8;
>
> That will specify that your script itself in utf, and it contains utf
> characters.
>
> Then just paste/enter into the regex the actual character(s) you want to
> search for.
>
> Otherwise, read the docco on how to specify unicode code points in
> regex, something like \U{...} (but not that; I know that's wrong). This
> page may be useful:
>
> http://perldoc.perl.org/perlunicode.html
>
> Charlie
>
--
___________________________________________
the embassy for talented young musicians
Podium International | Marek Stepanek | [email protected]
http://www.PodiumInternational.org
___________________________________________
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.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 post to this group, send email to [email protected].