<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"><<a href="mailto:jmr@macports.org" target="_blank">jmr@macports.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Revision: 144426<br>
> <a href="https://trac.macports.org/changeset/144426" rel="noreferrer" target="_blank">https://trac.macports.org/changeset/144426</a><br>
> Author: dstrubbe at <a href="http://macports.org" rel="noreferrer" target="_blank">macports.org</a><br>
> Date: 2016-01-08 12:16:33 -0800 (Fri, 08 Jan 2016)<br>
> Log Message:<br>
> -----------<br>
> doc-new: Add comments on locale in reinplace.<br>
><br>
> Modified Paths:<br>
> --------------<br>
> trunk/doc-new/guide/xml/portfile-tcl.xml<br>
><br>
> Modified: trunk/doc-new/guide/xml/portfile-tcl.xml<br>
> ===================================================================<br>
> --- trunk/doc-new/guide/xml/portfile-tcl.xml 2016-01-08 19:39:53 UTC (rev 144425)<br>
> +++ trunk/doc-new/guide/xml/portfile-tcl.xml 2016-01-08 20:16:33 UTC (rev 144426)<br>
> @@ -275,7 +275,9 @@<br>
> the command with the replacement text, in all files<br>
> specified.</para><br>
><br>
> - <para>Use -locale to set the locale</para><br>
> + <para>Use -locale to set the locale. For example, <code>locale -C</code><br>
> + if a non-ASCII file is being modified (which may otherwise give the error<br>
> + "sed: RE error: illegal byte sequence").</para><br>
<br>
Setting a locale is not needed for all non-ASCII files, just non-UTF-8<br>
ones (as the default locale is "en_US.UTF-8"). It may also be worth<br>
mentioning that using "C" 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. "en_US.ISO8859-1".<br>
<br>
Also, it should be "-locale C" not "locale -C".<br>
<br>
- Josh<br>
</blockquote></div><br></div>