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

Unicode stream titles break end marker #26

Closed
diceroll123 opened this issue Jul 16, 2015 · 5 comments
Closed

Unicode stream titles break end marker #26

diceroll123 opened this issue Jul 16, 2015 · 5 comments
Assignees
Labels

Comments

@diceroll123
Copy link

Unicode characters take up 2 characters in a len() so if there are any in a stream title, this pushes the index of end (see update_sidebar function) to be further.

2 unicode characters makes the index 4 characters off, making the sidebar have [](#endmarker)ker)ker) (and so on) if it persists

@Andygmb
Copy link
Owner

Andygmb commented Jul 16, 2015

Aha, didn't know len() used the amount of bytes as an indicator for length, and as unicode characters can be multiple bytes long.

Will submit hotfix for this now.

@Andygmb Andygmb added the bug label Jul 16, 2015
@Andygmb Andygmb self-assigned this Jul 16, 2015
@Andygmb
Copy link
Owner

Andygmb commented Jul 16, 2015

I can't seem to replicate it with streams using unicode characters and as i'm currently at work I can't start up a test stream to test specific characters. Could you link any streams that have characters that are breaking the bot?

Thanks

@diceroll123
Copy link
Author

http://www.twitch.tv/yeezuswalks

The title that's broken it was Yeezus ♠ ALWB Game vs APE ♠ Sponsored by EGO Gaming!

@Andygmb
Copy link
Owner

Andygmb commented Jul 17, 2015

Thank you. I've been able to recreate the bug with that string and will work on a fix.

Andygmb added a commit that referenced this issue Jul 26, 2015
@Andygmb
Copy link
Owner

Andygmb commented Jul 26, 2015

@diceroll123 This should be fixed now, there are still some unicode issues I can foresee (users messaging non-ascii characters to the bot's inbox), but it should no longer have an issue with the stream titles.

Will close this issue for now and move to a more generic issue:

#28

Please let me know if the issue hasn't been fixed or you encounter any other issues :)

@Andygmb Andygmb closed this as completed Jul 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants