Replace Accented Characters [message #654080] |
Wed, 27 July 2016 00:39  |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
Hi ,
Any one can help me with replacing Accented Characters with its base characters.
Please find the Example Below
SELECT regexp_replace('ñaàeéêèioô','[[=n=]]','n' )
FROM dual;
Output:
naàeéêèioô
In the above Example i have replace ñ as n. Similar way i want replace the rest of the characters as well
Thanks in Advance
|
|
|
|
|
|
|
|
|
Re: Replace Accented Characters [message #654108 is a reply to message #654104] |
Wed, 27 July 2016 02:22   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
"Tilded" don't seem to work that way, but one method for other accents could be to convert them to ascii:
SQL> SELECT CONVERT('ñaàeéêèioô', 'US7ASCII' ) FROM dual;
CONVERT('ÑAÀEÉÊÈIOÔ','US7ASCII')
----------------------------------------
?aaeeeeioo
|
|
|
|
|
|
|
Re: Replace Accented Characters [message #654434 is a reply to message #654198] |
Tue, 02 August 2016 23:42   |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
Hi,
How can i translate Trademark symbol to some other Character. ™ should be replaced as TM.
select translate('Target™','™','TM') from dual
Required Output
===============
TargetTM
|
|
|
|
|
Re: Replace Accented Characters [message #654439 is a reply to message #654436] |
Wed, 03 August 2016 01:31   |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
I have used the below query
select replace('Target™',chr(ascii('™')),'TM') from dual
But i want to replace Trademark symbol with TM & all accented Characters with its base characters. can we do it by storing all special characters & its replacement characters in a table. Then use this table in case of any replacement for a special characters?
|
|
|
|
|
Re: Replace Accented Characters [message #654446 is a reply to message #654443] |
Wed, 03 August 2016 02:43   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Michel Cadot wrote on Wed, 03 August 2016 08:38Yes but why doing this? The list is static why to use a table for this?
Depends. If he wants to replace all the emoji that find their way into Unicode with their "basic characters", too, then it might get quite complicated.
That ™ is TM is quite easy, but what about 🎄 ?
[Updated on: Wed, 03 August 2016 02:44] Report message to a moderator
|
|
|
|
|
|