<div dir="ltr">Oops and thanks for the further clarifications. I have just updated it.<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 5:02 PM, Joshua Root <span dir="ltr">&lt;<a href="mailto:jmr@macports.org" target="_blank">jmr@macports.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; Revision: 144426<br>
&gt;           <a href="https://trac.macports.org/changeset/144426" rel="noreferrer" target="_blank">https://trac.macports.org/changeset/144426</a><br>
&gt; Author:   dstrubbe at <a href="http://macports.org" rel="noreferrer" target="_blank">macports.org</a><br>
&gt; Date:     2016-01-08 12:16:33 -0800 (Fri, 08 Jan 2016)<br>
&gt; Log Message:<br>
&gt; -----------<br>
&gt; doc-new: Add comments on locale in reinplace.<br>
&gt;<br>
&gt; Modified Paths:<br>
&gt; --------------<br>
&gt;     trunk/doc-new/guide/xml/portfile-tcl.xml<br>
&gt;<br>
&gt; Modified: trunk/doc-new/guide/xml/portfile-tcl.xml<br>
&gt; ===================================================================<br>
&gt; --- trunk/doc-new/guide/xml/portfile-tcl.xml  2016-01-08 19:39:53 UTC (rev 144425)<br>
&gt; +++ trunk/doc-new/guide/xml/portfile-tcl.xml  2016-01-08 20:16:33 UTC (rev 144426)<br>
&gt; @@ -275,7 +275,9 @@<br>
&gt;                the command with the replacement text, in all files<br>
&gt;                specified.&lt;/para&gt;<br>
&gt;<br>
&gt; -              &lt;para&gt;Use -locale to set the locale&lt;/para&gt;<br>
&gt; +              &lt;para&gt;Use -locale to set the locale. For example, &lt;code&gt;locale -C&lt;/code&gt;<br>
&gt; +           if a non-ASCII file is being modified (which may otherwise give the error<br>
&gt; +           &quot;sed: RE error: illegal byte sequence&quot;).&lt;/para&gt;<br>
<br>
Setting a locale is not needed for all non-ASCII files, just non-UTF-8<br>
ones (as the default locale is &quot;en_US.UTF-8&quot;). It may also be worth<br>
mentioning that using &quot;C&quot; will only allow ASCII characters to be<br>
processed correctly by the reinplace, so if you need it to work on<br>
non-ASCII characters you need to set a locale with the correct charset<br>
for the file, e.g. &quot;en_US.ISO8859-1&quot;.<br>
<br>
Also, it should be &quot;-locale C&quot; not &quot;locale -C&quot;.<br>
<br>
- Josh<br>
</blockquote></div><br></div>