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

Can't handle emoji in names #30

Closed
Froelund opened this issue Sep 14, 2017 · 4 comments
Closed

Can't handle emoji in names #30

Froelund opened this issue Sep 14, 2017 · 4 comments

Comments

@Froelund
Copy link

Emojis ends up as an illegal character:

t.equal(initials('John ๐Ÿface'), 'J๐Ÿ', 'John ๐Ÿface (j๐Ÿ) โ˜› j๐Ÿ');

โœ– John ๐Ÿface (j๐Ÿ) โ˜› j๐Ÿ
    --------------------------
      operator: equal
      expected: 'J๐Ÿ'
      actual:   'J๏ฟฝ'
      stack: |-
@gr2m
Copy link
Owner

gr2m commented Sep 15, 2017

thatโ€™s a new one :) How would you fix it?

@Froelund
Copy link
Author

Yes! The times they are a-changin' ๐Ÿ‘
I don't know what the exact issue is, but I suspect something with number of bytes taken from the lastname doesn't match the length of the first character(emoji).

@gr2m
Copy link
Owner

gr2m commented Sep 15, 2017

So I see two ways addressing this

  1. Mention in the README that initials doesnโ€™t handle emojis well
  2. Implement some good handling of emojis that I donโ€™t see right now :)

@gr2m
Copy link
Owner

gr2m commented Jan 7, 2018

@Froelund did you come up with a workaround?

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

No branches or pull requests

2 participants