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

replace() leaves unicode variation selector-16 #25

Open
ogslumber opened this issue May 23, 2021 · 0 comments
Open

replace() leaves unicode variation selector-16 #25

ogslumber opened this issue May 23, 2021 · 0 comments

Comments

@ogslumber
Copy link

Describe the bug
replace() function leaves unicode variation selector-16 (\xef\xb8\x8f) when replacing Repeat Button emoji (πŸ”οΈ).

To Reproduce

import demoji

sample_var = 'πŸ”οΈ sample text'
print(sample_var.encode('utf-8'))
>>> b'\xf0\x9f\x94\x81\xef\xb8\x8f sample text'

sample_var = demoji.replace(sample_var)
print(sample_var.encode('utf-8'))
>>> b'\xef\xb8\x8f sample text'

Expected behavior
String without \xef\xb8\x8f sequence:

>>> b' sample text'
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