I have bunch of byte strings (str
, not unicode
, in python 2.7) containing unicode data (in utf-8
encoding).
I am trying to join them( by "".join(utf8_strings)
or u"".join(utf8_strings)
) which throws
UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 0: ordinal not in range(128)`
Is there any way to make use of .join()
method for non-ascii strings? sure I can concatenate them in a for loop, but that wouldn't be cost-effective.