Ticket #3 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

allow_unicode missing in emitter?

Reported by: tim@… Owned by: xi
Priority: normal Component: pyyaml
Severity: major Keywords: unicode utf8 encoding
Cc: tim@…

Description

Trying to emit plain chars in utf8 (£ symbol for instance - \xc2\xa3) isn't working.. I think I've tracked it down to missing allow_unicode passing through to emitter and possibly the emit events resetting allow_unicode (I won't say I've fixed it as I've forced allow_unicode to True in various places to get it to emit plain's in utf-8 rather than double quoted escaped unicode). I'll post more tomorrow if I can get my fix cleaner. Looking good btw!!

Change History

comment:1 Changed 9 years ago by xi

  • Status changed from new to closed
  • Resolution set to fixed

I think I've fixed it.

>>> print yaml.dump("\xc2\xa3", allow_unicode=True)
£

Please reopen the ticket if you still experience problems with unicode output.

Note: See TracTickets for help on using tickets.