How to remove emoji's from unicode string

Stephen MacLean smaclean at madmansoft.com
Mon Jan 14 02:40:45 CET 2019


Hi Richmond,

Thanks for posting this!

There are multiple ranges for emojis, as more were added in each version on Unicode.

Here is the list for the latest version of unicode 12.0

https://www.unicode.org/Public/emoji/12 ... i-data.txt <https://www.unicode.org/Public/emoji/12.0/emoji-data.txt>

I think that between your stripper and updated unicode map, it should be able to find and strip them all?


From my Forum reply.

> On Jan 13, 2019, at 4:34 PM, Richmond via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Cop a look at this:
> 
> *http://forums.livecode.com/viewtopic.php?f=7&t=32030*
> 
> On 13.01.19 22:17, Stephen MacLean via use-livecode wrote:
>> Hi All,
>> 
>> The recent conversations on using offset() with Unicode strings was very enlightening, thanks to all that took part!.
>> 
>> I have data stored in UTF8mb4. I use textDecode after loading it from the DB to put it into a format that LC understands. I then use offset() to find certain tags, text, etc. to work with. However, if there are emoji in that string, the offset() function hard crashes with a out of range error.
>> 
>> Due to the troubles offset(), I’m looking for a way to remove the emojis before I have to use the offset function.
>> 
>> Short of compiling a list of emoji and the decimal equivalent, does anyone have a way to do this in LC?
>> 
>> My offset code has been rock solid, except for these rare instances were there are emoji in the text and I am not really looking to change it if I don’t have to, preferring to just remove the emoji if possible.
>> 
>> TIA,
>> 
>> Steve MacLean
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list