Bug 11676 - sed: RE error: illegal byte sequence
Summary: sed: RE error: illegal byte sequence
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.30.x
Hardware: All Mac OS
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-15 16:27 UTC by Ryan Schmidt
Modified: 2019-02-15 16:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Schmidt 2019-02-15 16:27:25 UTC
Hello,

After downloading the busybox 1.30.1 source code any running `make menuconfig`, exiting it, and then running `make`, the first output is:

sed: RE error: illegal byte sequence
sed: RE error: illegal byte sequence
sed: RE error: illegal byte sequence
sed: RE error: illegal byte sequence

This error is produced by the `sed` bundled with recent versions of macOS if you are operating on files that are not in the UTF-8 encoding. In that case, you should tell `sed` what the encoding of each file is, by setting the `LC_CTYPE` environment variable to the correct locale, for example `LC_CTYPE=en_US.ISO8859-1` if the files are in American English ISO 8859-1 encoding.

Alternately, if you're operating on binary files or on files whose encoding is unknown, and you only want to replace ASCII characters, you can specify the `C` locale.