TextArea and Emoji

Is it possible to do a general replace of emojis? In my case they simply can be discarded…

Oh. Once again converting the text to string seems to do the job…

LOL. Nope. In my test it accidentally turned up with the right position, but in reality converting to string gives another wrong result.

Did you try to use the B variants ? (LeftB, RightB, LeftB, LenB…) ?

If you need to read characters rather than bytes, use the Left function.

This will strip emojis (called “emoticons” in the Unicode charts) :

for i as integer = &h1F600 to 1F64F me.text = replaceall(me.text, chr(i), "") next

It is not the fastest way, but it will sure get them all.

Based on Unicode chart http://www.unicode.org/charts/PDF/U1F600.pdf

It is possible yet some additional emojis exist in pages http://www.unicode.org/charts/PDF/U2600.pdf, http://www.unicode.org/charts/PDF/U1F300.pdf, http://www.unicode.org/charts/PDF/U1F900.pdf. Technically they are miscellaneous symbols, but they are often called emojis anyway.

I vaguely remember seeing something along these lines using regular expressions where (who else ?) Kem brilliantly elaborated the search, but am unable to find it back at this time.

[quote=323958:@Emile Schwarz]Did you try to use the B variants ? (LeftB, RightB, LeftB, LenB…) ?

If you need to read characters rather than bytes, use the Left function.[/quote]

I did. Seemed to work. Thanks for your input!

[quote=323960:@Michel Bujardet]This will strip emojis (called “emoticons” in the Unicode charts) :

for i as integer = &h1F600 to 1F64F me.text = replaceall(me.text, chr(i), "") next

It is not the fastest way, but it will sure get them all.

Based on Unicode chart http://www.unicode.org/charts/PDF/U1F600.pdf

It is possible yet some additional emojis exist in pages http://www.unicode.org/charts/PDF/U2600.pdf, http://www.unicode.org/charts/PDF/U1F300.pdf, http://www.unicode.org/charts/PDF/U1F900.pdf. Technically they are miscellaneous symbols, but they are often called emojis anyway.

I vaguely remember seeing something along these lines using regular expressions where (who else ?) Kem brilliantly elaborated the search, but am unable to find it back at this time.[/quote]

Cheers!

Usng 2018R2 this problem still exists.
I’m logging error/Warning messages to a textarea and in front of each message I put an Icon/ emoticon
The text is now all over the place.

Any solutions?