Add LC_ALL=C to convince sed more firmly to use bytes.