id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc
96	Added note about UnicodeError instead of the tuple of multiple classes. Also, bumping this ;-)	mike@…	xi	"{{{
>>> import syck
>>> syck.dump({'blah' : '\xea\xd3'})
Traceback (most recent call last):
  File ""C:\workspace\Digsby\syck_test.py"", line 2, in <module>
    syck.dump({'blah' : '\xea\xd3'})
  File ""C:\workspace\dpython\lib\site-packages\syck\dumpers.py"", line 295, in dump
    dumper.dump(object)
  File ""C:\workspace\dpython\lib\site-packages\syck\dumpers.py"", line 23, in dump
    self.emit(self._convert(object, {}))
  File ""C:\workspace\dpython\lib\site-packages\syck\dumpers.py"", line 40, in _convert
    self._convert(value, object_to_node)
  File ""C:\workspace\dpython\lib\site-packages\syck\dumpers.py"", line 28, in _convert
    node = self.represent(object)
  File ""C:\workspace\dpython\lib\site-packages\syck\dumpers.py"", line 97, in represent
    return representer(object)
  File ""C:\workspace\dpython\lib\site-packages\syck\dumpers.py"", line 112, in represent_str
    return _syck.Scalar(object.encode('ascii'), tag=""tag:yaml.org,2002:str"")
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
}}}

This can be fixed by changing line 115 of [http://pyyaml.org/browser/pysyck/trunk/lib/syck/dumpers.py dumpers.py] from 
{{{
        except UnicodeDecodeError:
}}}

to 
{{{
        except (UnicodeDecodeError, UnicodeEncodeError):
}}}

I left the UnicodeDecodeError in the except clause, but I don't think catching it is necessary unless _syck.Scalar(...) can raise a UnicodeDecodeError (I wasn't certain of this, nor am I sure how to find out).

Feel free to contact me for more info."	defect	new	normal	pysyck	normal			
