Details
Description
PySpark throws a UnicodeEncodeError when trying to save unicode objects to text files. This is because saveAsTextFile() calls str() to get objects' string representations, when it should be calling unicode() instead.
This is probably a one-line fix.
This was originally reported on the mailing list at https://mail-archives.apache.org/mod_mbox/incubator-spark-user/201311.mbox/%3CCAPS2vjrorZGbxt7Nyqb1ZLZABk2MZy1O1p-KfF%3DxGJzSN0oq9g%40mail.gmail.com%3E