amoffat/pbs — Issue #43: Buggy unicode support
Author: amoffat
Created: 2012-02-23 22:30:26+00:00
State: open
Labels: bug

The issue stems from using repr() and %r when parsing the commandline arguments. The problem is, repr escapes escapes, and unicode characters are escaped. So we can't use repr to easily handle escaping. Example of problem:

```python
from pbs import echo
print echo(u"漢")
print echo("漢")
```

Prints

```
u\u6f22
\xe6\xbc\xa2
```

When it should be printing the actual unicode character. This is because the subprocess "echo" is getting something like u\\\u6f22 and \\\xe6\\\xbc\\\xa2 (double escaped). So that's bad. Need some more thought on this..