sym2rev() or revs[] by using PyUnicode_AsUTF8AndSize(). The str is converted into an UTF-8 encoded byte array. This fixes "print s['RELENG_4']" test. Also use a bytes object for "log" or "checkout" instead of a str object. This is required to keep the original encoding (utf-8, latin-1, euc-jp and so on). ok sthen