Let's assume the following semantics as desirable: 1. All characters and raw bytes (up to regexp syntax) match themselves no matter whether they are given as literals or in character alternatives. 2. All raw bytes C match themselves and nothing else no matter whether the pattern or target string/buffer are unibyte or multibyte. 3. Ranges from ASCII to raw bytes work as expected and do not contain Unicode characters above U+007F. 4. Ranges from non-ASCII Unicode characters to raw bytes make no sense and are treated as empty. Here is a patch.