Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utf-8 input and output support #6

Open
jquast opened this issue Apr 15, 2013 · 1 comment
Open

utf-8 input and output support #6

jquast opened this issue Apr 15, 2013 · 1 comment

Comments

@jquast
Copy link

jquast commented Apr 15, 2013

Per this hack,

https://github.com/ianepperson/telnetsrvlib/blob/master/telnetsrv/telnetsrvlib.py#L785

It is actually possible to write fancy characters to most modern telnet clients, by way of encoding as utf-8. Decoding is more difficult, as bytes come in asynchronously. They can, however, still be decoded by using an "incrementaldecoder()" instance available from the codecs module. An example of this can be found here:

https://github.com/jquast/x84/blob/master/x84/blessings.py#L382

(Note this is not the final interface submitted upstream to the official 'blessings' project)

@jquast
Copy link
Author

jquast commented Apr 15, 2013

RFC's may require implementing negotiation for BINARY to support utf-8, due to the 127-256 and other magic bits used in utf-8 encoded bytestreams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant