| Summary: | /dev/random can not be source for tr(1) | tr: Illegal byte sequence | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Slawomir Wojciech Wojtczak <vermaden> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 8.0-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Slawomir Wojciech Wojtczak
2010-01-19 18:50:05 UTC
/dev/random just isn't guaranteed to produce correct multibyte characters (and I guess you are using multibyte locale). Try setting LC_CTYPE to single byte locale: > locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_ALL= > head -c 200 /dev/urandom | tr -c -d 'A-Za-z0-9' tr: Illegal byte sequence > head -c 200 /dev/urandom | env LC_CTYPE=C tr -c -d 'A-Za-z0-9' myRUBav1EHfJrD0HCSuurHRPYmqMPzWErJhHRgp6ze0YisDoA4x State Changed From-To: open->closed From misfiled PR bin/142986: Date: 20 Jan 2010 20:46:31 +0100 |