MAIN Posted November 12, 2020 Share Posted November 12, 2020 We want to use custom fields in a product and everything works fine. But if some customer will use emoticons by using smartphone keyboard the custom message will be cut at the first emoticon. For example if we use "Hallo ihr Lieben! 🍀Um euch den Tag zu versüßen mal etwas andere Grüße. 🍫" then the message will be "Hallo ihr Lieben!" .... I already switched the table ps_customized_data to utf8mb4_general_ci but this didn't fix it ... Any ideas ? For me it would be fine if there couldn't be used any emoticons in the message filed ... Thank you ! Micha Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2020 Share Posted November 14, 2020 (edited) Remove not ASCII characters from a string: return preg_replace('/[[:^print:]]/', '', $text); or return preg_replace('/[^\pL\pM[:ascii:]]+/g', '', $text); Edited November 14, 2020 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now