X Tutup
Skip to content

Decode Emoji byte strings into unicode strings if using Python 3#85

Merged
leandrotoledo merged 5 commits intopython-telegram-bot:masterfrom
jh0ker:master
Nov 10, 2015
Merged

Decode Emoji byte strings into unicode strings if using Python 3#85
leandrotoledo merged 5 commits intopython-telegram-bot:masterfrom
jh0ker:master

Conversation

@jh0ker
Copy link
Copy Markdown
Member

@jh0ker jh0ker commented Oct 22, 2015

I used a class decorator to call a function upon class creation, that decodes every class attribute of the type 'bytes' into 'str' if sys.version_info.major == 3

Fix for #80

@jh0ker
Copy link
Copy Markdown
Member Author

jh0ker commented Oct 22, 2015

Hey, I just realized I messed up programming languages in the docstrings of telegram/emoji.py. It says 'Class' instead of 'type'. Maybe you could fix it, so I don't have to create another pull request :)

This was referenced Oct 23, 2015
@franciscod
Copy link
Copy Markdown
Contributor

My #24 fix was wrong: the emojis should always be strings, not byte arrays... ,maybe we should dig deeper on py2 and py3 unicode compatibility, many bugs come from these things..

leandrotoledo added a commit that referenced this pull request Nov 10, 2015
Decode Emoji byte strings into unicode strings if using Python 3
@leandrotoledo leandrotoledo merged commit 1879cff into python-telegram-bot:master Nov 10, 2015
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup