Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Remove an unwanted special character

Does anybody have any ideas on how to get rid of this character from a text string?

 

I tried replace, but it doesn't seem to recognize it:

REPLACE(TextString,'  ','') AS TextClean,

5 Replies
Anonymous
Not applicable
Author

sQuare Character.png

Had to insert a picture since it wouldn't display in the forum.  This is fiendish little character!  Any ideas to dispose of it are welcome.

RedSky001
Partner - Creator III
Partner - Creator III

Do you know what the special character actually is?

ie if it was a tab you could do purgechar(TextString,char(9))

Replace 9 with the correct value.

 

Mark

Anonymous
Not applicable
Author

OK, so I think the character is Unicode U+25A1.  I am not sure there is a conversion to ASCII.  If there was, I could use CHR().  Is there a way to add support for this unicode character in my script or another function that would handle this?

Qrishna
Specialist III
Specialist III

Hi Aaron,

You can use PurgeChar() function to remove unwanted characters from a string.

Eg: If one of the record in the field Full_Name: Jam3e#s Ca%mer~on

Then PurgeChar(Full_Name,'3,#,%,~'returns  Full_Name: James Cameron.

Hope that helps.

Thanks

krishna

Not applicable
Author

Please use KeepChar

eg:  KeepChar(Field,'abcdefg......xyz1234567890') as Field