[MacPorts] #37066: p5-shell-parser: sed: RE error: illegal byte sequence
MacPorts
noreply at macports.org
Wed Nov 21 08:59:33 PST 2012
#37066: p5-shell-parser: sed: RE error: illegal byte sequence
------------------------------+--------------------------------
Reporter: ag@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.2
Resolution: | Keywords: mountainlion
Port: p5-shell-parser |
------------------------------+--------------------------------
Comment (by jeremyhu@…):
Replying to [comment:3 ryandesign@…]:
> Replying to [comment:2 jmr@…]:
> > and secondly, setting it to C will produce incorrect results unless
the non-UTF8 characters are confined to comments. You need to use the
actual character encoding of the file (or convert it from that to UTF-8
before running sed).
>
> [http://lists.macosforge.org/pipermail/macports-
dev/2012-August/019993.html Jeremy Huddleston Sequoia said] using the C
locale was fine, and that's what we've been doing for months already,
since the release of Mountain Lion, in dozens of ports. If this was wrong,
then there's a bit of cleanup to be done. Perhaps a recipe in
PortfileRecipes would be good too, in either case.
If the reinplace is actually matching/changing what is written in that
other locale, then it can cause a problem. If you want to just skip over
it and continue as sed has done in the past, then LC_CTYPE=C is ok. The
best solution would be to fix the file's encoding to UTF-8 and submit the
change upstream, but that's not always a possibility as some files contain
multiple encodings in embedded byte-streams on purpose (and thus you need
to use the C LC_TYPE to deal with them).
--
Ticket URL: <https://trac.macports.org/ticket/37066#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list