What are the semantics of .set_encoding()?
1) I've got a file encoded using cp1250 with accented characters,
2) I open this file in Sublime, unfortunately it's able to interpret file content as 'utf-8' string, so the fallback encoding is not used:
3) Then I call:
>>> view.set_encoding(u'Central European (Windows 1250)')
u'Central European (Windows 1250)'
4) However, it seems like Sublime did not reinterpret the file content (bytes) using new encoding, but simply stored new encoding to be used when saving.
Now that I think about it, this behaviour is reasonable. However I would like to be able somehow handle encoding specifying comments python.org/dev/peps/pep-0263/.
What do you think jps?