Hi, <div><br></div><div>I want to do (one-line) replacement with Perl on utf8 strings. </div><div><br></div><div>Here is the hex dump of what exactly the utf8 strings looks like:</div><div><br></div><div>cat myfile.utf8 | od -t x1 | head -3 </div>
<div>0000000 3c 00 73 00 3a 00 45 00 6e 00 76 00 65 00 6c 00</div><div>0000020 6f 00 70 00 65 00 20 00 78 00 6d 00 6c 00 6e 00</div><div>0000040 73 00 3a 00 73 00 3d 00 22 00 68 00 74 00 74 00</div><div><br></div><div>I.e., each character takes 2 bytes. </div>
<div><br></div><div>I don't know how to strip the high byte (please help), but this is what the strings actually is:</div><div><br></div><div><div><s:Envelope xmlns:s="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"></div>
<div>  <s:Body></div></div><div>   . . .</div><div><br></div><div>I just want to do some string manipulations with one-line Perl, e.g.:</div><div><br></div><div> cat myfile.utf8 | <b id="internal-source-marker_0.48615090851671994" style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap">perl -p000e ‘s/</span></b><s:Body><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap">/</span></b><s:Body xmlns:a=...><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap">/'</span></b></div>
<div><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></b></div>
<div><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap">How can I do that? </span></b></div>
<div><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></b></div>
<div><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap">Thanks</span></b></div>
<div><b style="font-family:'Times New Roman';font-size:medium"><span style="font-size:13px;font-family:Arial;color:rgb(34,34,34);font-weight:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></b></div>
<div><br></div>