You can use the .bytes
property on a BitVector
to convert the sequence of bits in the vector into the same sequence of bits in the form of a Python (2.7) str
object.
Because str
s are encoding-agnostic, you could consider yourself done at this point, provided that the sequence of bits that you stored in your vector correspond to a UTF-8--encoded Unicode string. (In other words, using this approach it's up to you to store bits in your vector that correspond to some UTF-8--encoded sequence of Unicode characters.)