Oracle Unknown Character

oraclereplace

I have a script,

UPPER(REPLACE(REPLACE(REPLACE(REGEXP_REPLACE(TRIM(mbr.mbr_first_name) || ' ' || TRIM(mbr.mbr_last_name), '[-+"=;:,<>?\/.~`!@#$%^&*()_\-|{}[]]*',''), CHR(9), ' '), CHR(10), ' '), CHR(13), ' '))

where it basically removes special characters (as much as possible) and remains only the alphabet and numeric.

But after generation, I still get this (�) black diamond with white question mark.

Is there a way to include this in the regexp_replace or to identify the CHR() value for me to remove this kind of characters

Best Answer

regexp_replace(TRIM(mbr.mbr_first_name) || ' ' || TRIM(mbr.mbr_last_name),'[^a-zA-Z0-9 ]')