Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Identify Emoji / Unicode >x in Text

Hi everyone, help appreciated on this one, I have searched far and wide to no avail.

I am building a simple Whatsapp chat analyser in Qlikview and I want to be able to tell which messages have emoji in them.

The input data is a text file from Whatapp I have imported to excel which makes the messages look something like this:

Did you see the game last night? ðŸ”

I.e. the emoji have been replaced by their unicode character.

I then load the excel file into Qlikview.

My research so far has uncovered that these special characters have a unicode value greater than 128 so I was trying to find a way to loop through the letters in text to look for those with unicode > 128 (noting that Ord('character') gives the unicode value.

My aim is to create a column that shows if a message has emoji so I can count the number of messages containing emoji.

Thanks,

Ben

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something along these lines

Input:

LOAD Recno() as ID, * INLINE [

WhatsappText

Did you see the game last night? ðŸ”

Standard Text

];

LEFT JOIN (Input)

LOAD ID, Max(OrdFlag) as Flag GROUP BY ID;

LOAD  *, If(Ord>128,1,0) as OrdFlag;

LOAD ID, Iterno() as CharNo, Ord(Mid(WhatsappText,Iterno(),1)) as Ord, Mid(WhatsappText,Iterno(),1) as Char

RESIDENT Input

While iterno() <= Len(WhatsappText);

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe something along these lines

Input:

LOAD Recno() as ID, * INLINE [

WhatsappText

Did you see the game last night? ðŸ”

Standard Text

];

LEFT JOIN (Input)

LOAD ID, Max(OrdFlag) as Flag GROUP BY ID;

LOAD  *, If(Ord>128,1,0) as OrdFlag;

LOAD ID, Iterno() as CharNo, Ord(Mid(WhatsappText,Iterno(),1)) as Ord, Mid(WhatsappText,Iterno(),1) as Char

RESIDENT Input

While iterno() <= Len(WhatsappText);

Anonymous
Not applicable
Author

Excellent - works! Thanks!