STIXProject/python-stix — pull request #235 by bworrell (2014-12-05 22:59:28+00:00)
Title: Unicode: Round Two

Changed up the `to_xml()` and `from_xml()` methods to allow users to specify character encodings as parameters.

* Added `encoding` param to `Entity.to_xml()`.
* Default is `utf-8`.
* Passing in `None` causes a unicode string to be returned
* Added `encoding` param to `STIXPackage.from_xml()` and all supporting `utils.parser` classes and methods.
* Changed `quote_attrib()` and `quote_xml()` methods to return unicode strings rather than character encoded strings.
* Added/modified unit tests to test new behaviors.

@gtback, lemme know what you think. If everything looks alright I can apply the same sort of changes to python-cybox.