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

grapheme\slice returns unexpected result for emojis #9301

Open
blurrcat opened this issue Nov 29, 2022 · 0 comments
Open

grapheme\slice returns unexpected result for emojis #9301

blurrcat opened this issue Nov 29, 2022 · 0 comments

Comments

@blurrcat
Copy link

Describe the bug
grapheme\slice returns unexpected result for emojis

Standalone code, or other way to reproduce the problem

Steps to reproduce the behavior:

  1. Open repl hhvm -a
  2. run echo \grapheme_substr('💪💪💪', 0, 1)

Expected behavior

should return one emoji:

hphpd> echo \grapheme_substr('💪💪💪', 0, 1)
💪

Actual behavior
returns 2 emojis:

hphpd> echo \grapheme_substr('💪💪💪', 0, 1)
💪💪

Environment

  • Operating system: Ubuntu 18.04
  • Installation method: docker
  • HHVM Version
> hhvm --version
HipHop VM 4.153.1 (rel) (non-lowptr)
Compiler: remotes/origin/4.153.1-slack-0-g0d6665670e7cfe81a1e0073009a242b55427e1aa
Repo schema: 02e77cd368c8eee9d671aa04701f100de041e020

> hh_client --version
hackc-af371b47fe0b21e407dd864cda303511763bb7c1-4.153.1
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