On Python 2.7, all string parameters are treated as unicode strings for consistency with Python 3 and with the encoding of Factorio blueprint strings. However, setters should take byte strings as input and convert them to unicode automatically, so you shouldn’t have to worry about it in most cases.