jjohhn has asked for the wisdom of the Perl Monks concerning the following question:
which seems to convert utf-8 to *something* (probably windows-ansi)s/([\xC2\xC3])([\x80-\xBF])/chr(ord($1)<<6&0xC0|ord($2)&0x3F)/eg;
Could someone help me understand the expression? The search part I can pretty much get, but the replace has me alittle puzzled. Specifically
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex for utf-8
by Thelonius (Priest) on Feb 28, 2003 at 00:05 UTC | |
by jjohhn (Scribe) on Feb 28, 2003 at 02:14 UTC | |
by Thelonius (Priest) on Feb 28, 2003 at 03:34 UTC | |
by Anonymous Monk on Feb 28, 2003 at 05:13 UTC | |
by Thelonius (Priest) on Feb 28, 2003 at 16:12 UTC | |
| |
|
Re: regex for utf-8
by Zaxo (Archbishop) on Feb 27, 2003 at 23:05 UTC | |
by jjohhn (Scribe) on Feb 27, 2003 at 23:30 UTC | |
by John M. Dlugosz (Monsignor) on Feb 28, 2003 at 16:20 UTC | |
by Anonymous Monk on Feb 28, 2003 at 22:46 UTC | |
by John M. Dlugosz (Monsignor) on Feb 28, 2003 at 23:01 UTC | |
| |
|
Re: regex for utf-8
by John M. Dlugosz (Monsignor) on Feb 27, 2003 at 23:35 UTC | |
|
Re: regex for utf-8
by allolex (Curate) on Feb 27, 2003 at 23:23 UTC | |
by jjohhn (Scribe) on Feb 27, 2003 at 23:37 UTC | |
|
Re: regex for utf-8
by Anonymous Monk on Apr 18, 2010 at 11:52 UTC |