Bug 11676

Summary: sed: RE error: illegal byte sequence
Product: Busybox Reporter: Ryan Schmidt <busybox>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.30.x   
Target Milestone: ---   
Hardware: All   
OS: Mac OS   
Host: Target:
Build:

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.