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

Π•moji icons break after processing by the convert() function #239

Closed
kva4991 opened this issue Dec 30, 2022 · 1 comment
Closed

Π•moji icons break after processing by the convert() function #239

kva4991 opened this issue Dec 30, 2022 · 1 comment

Comments

@kva4991
Copy link

kva4991 commented Dec 30, 2022

Hello. Happy New Year!
I have an html string
text = "<p> 😊 πŸ˜‚ 😭 😘 😁 πŸ˜‰ 😍 πŸ€” πŸ€” πŸ˜ͺ 😻 πŸ‘© πŸ™ πŸ‘¨ πŸ‘‹ πŸ‘Œ πŸ‘‰ πŸ‘ πŸ‘ˆ βœ‹ πŸ‘‡ πŸ‘ πŸ‘† πŸ‘Ž ☝ 🀘 🀳 ✌ πŸ– πŸ‘ ✊ ✍ 🎀 πŸŽ™ 🎹 🎸 🎻 πŸ“» 🎢 🎡 ❀️ 🎧 πŸ“΅ πŸ‘ͺ </ p>"
when using the function with such parameters:
tijsverkoyen\css-to-inline-styles\src\CssToInlineStyles.php

$text = $cssToInlineStyles->convert(
   '<div class="ck-content">' . $model->text . '</div>%FOTTER%' ,
    file_get_contents(YiiBase::getPathOfAlias('ext') . '/ckeditor5-classic/build/styles.css',
)

The output is broken the emoji that are now the letter Γ° (one letter replaced by a single emoji):
Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½Β­ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½Β€οΏ½ Γ°οΏ½Β€οΏ½ Γ°οΏ½οΏ½Βͺ Γ°οΏ½οΏ½Β» Γ°οΏ½οΏ½Β© Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½Β¨ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ βœ‹ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ ☝ Γ°οΏ½Β€οΏ½ � ✌ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½οΏ½ ✊ ✍ Γ°οΏ½οΏ½Β€ Γ°οΏ½οΏ½οΏ½ Γ°οΏ½οΏ½ΒΉ Γ°οΏ½οΏ½ΒΈ Γ°οΏ½οΏ½Β» Γ°οΏ½οΏ½Β» Γ°οΏ½οΏ½ΒΆ Γ°οΏ½οΏ½Β΅ ❀️ Γ°οΏ½οΏ½Β§ Γ°οΏ½οΏ½Β΅ Γ°οΏ½οΏ½Βͺ

There is a strange thing: not all emoji icons break.
It seems to me that not all sets of standard emoji are embedded in this function. And because of this, an erroneous conversion occurs.

@Ugoku
Copy link
Contributor

Ugoku commented Jan 2, 2023

Duplicate of #237. A PR has been submitted (#238) but not yet merged.

@stof stof closed this as completed Jan 3, 2023
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

3 participants