Github user ashashwat commented on the issue: https://github.com/apache/spark/pull/20503 @HyukjinKwon Here is what I tried: ``` # Code: return "<Row(%s)>" % ", ".join(fields.encode("utf8") for fields in self) >>> Row (u"ì", "11") <Row(ì, 11)> # Fails for integer fields. # Code: return "<Row(%s)>" % ", ".join(str(fields) for fields in self) >>> Row (u"ì", "11") UnicodeEncodeError: 'ascii' codec can't encode character u'\uc544' in position 0: ordinal not in range(128) # Code: return "<Row(%s)>" % ", ".join(repr(fields) for fields in self) >>> Row (u"ì", 11) <Row(u'\uc544', 11)> # Code: return "<Row(%s)>" % ", ".join(unicode(fields).encode("utf8") for fields in self) >>> Row (u"ì", 11) <Row(ì, 11)> ``` repr is definitely a better option than str. But why not unicode?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org