turns out "ord" function does not work as expected in python2 despite docs, not sure why, moved on to use .encode(encoding='UTF-8') for all cases when we want a length 1 string to become a c_char.