Hi any idea how can I replace non latin characters...
# general
p
Hi any idea how can I replace non latin characters in NetSuite Saved Search with latin characters, ex. Ç > C i use REGEXP_REPLACE(ASCIISTR{field},\\[[A-Z]',") But it is only replacibg with \00C7 which i think another encoding for Ç Any recomendation to improve this Search formula (text)?
s
ASCIISTR
unfortunately does not quite convert non-ASCII characters to an ASCII equivalent: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ASCIISTR.html
CONVERT({field}, 'US7ASCII')
is closer, but not perfect. It doesn’t handle certain characters like
ß
, so you may need to use a combined approach, manually replacing additional characters not handled by convert:
CONVERT(REGEXP_REPLACE({field}, 'ß', 'ss'), 'US7ASCII')
Keep in mind this is essentially mangling certain words, making them likely incorrect in their original language
p
Thanks Scott. The purpose is to clean up vendors of any non latin characters which is causing a problem with EAP file to the bank. Bank reject files with those characters, so we are trying to normalize them
s
ah, okay, that’s a reasonable use case