# Replace Accents

**URL:** https://community.mp3tag.de/t/replace-accents/6298
**Category:** Support
**Created:** [February 19, 2008, 8:18pm UTC](https://community.mp3tag.de/t/replace-accents/6298 "2008-02-19T20:18:05Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Lare2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/13edae/32.png) [@Lare2](https://community.mp3tag.de/u/Lare2)
#### Post date: [February 19, 2008, 8:18pm UTC](https://community.mp3tag.de/t/replace-accents/6298/1 "2008-02-19T20:18:05Z")

</div>

Is there a way to remove accents without creating a replace action for each letter.

I want to replace all "á é í ó ú" with "a e i o u"

Is creating replace actions for each letter under an action group the only way to achieve this. ![:unsure:](https://community.mp3tag.de/uploads/default/original/1X/cfaeba84fe6704387c5b34dfdd8172bd51b6f533.gif ":unsure:")

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [February 21, 2008, 3:47pm UTC](https://community.mp3tag.de/t/replace-accents/6298/2 "2008-02-21T15:47:00Z")

</div>

> Is creating replace actions for each letter under an action group the  
> only way to achieve this.

I'd say Yes, given Florian (Mp3tag developer)'s reply to the similar question at: [Reducing filename to ASCII](https://community.mp3tag.de/t/3971/1)

If you want to cover uppercase too, you'll need separate Replace actions for those. Also you might want to add ñ and ü.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [February 21, 2008, 5:12pm UTC](https://community.mp3tag.de/t/replace-accents/6298/3 "2008-02-21T17:12:36Z")

</div>

By the way, if your goal is pathname compatibility or string comparability, $ansi() might do the job better - it is a lot more concise, and covers other possibly non-Extended ASCII characters too.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [February 21, 2008, 7:53pm UTC](https://community.mp3tag.de/t/replace-accents/6298/4 "2008-02-21T19:53:45Z")

</div>

> [@chrisjj](#):
>
> ... $ansi() might do the job better ...

Is there a table list anywhere in the documentation to see what $ansi() converts in reality char by char?

DD.20080221.2154.CET

---

<div class="post-metadata">

### Author: ![Lare2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/13edae/32.png) [@Lare2](https://community.mp3tag.de/u/Lare2)
#### Post date: [March 7, 2008, 8:14pm UTC](https://community.mp3tag.de/t/replace-accents/6298/5 "2008-03-07T20:14:56Z")

</div>

> [@DetlevD](#):
>
> Is there a table list anywhere in the documentation to see what $ansi() converts in reality char by char?
> 
> DD.20080221.2154.CET

Yes I'll love to learn more about it can you point us to the right direction.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 7, 2008, 8:26pm UTC](https://community.mp3tag.de/t/replace-accents/6298/6 "2008-03-07T20:26:18Z")

</div>

$ansi() converts the given string using the current system codepage. So there is no fixed list of characters since the result depends on the host system's active codepage.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 8, 2008, 10:08am UTC](https://community.mp3tag.de/t/replace-accents/6298/7 "2008-03-08T10:08:11Z")

</div>

I'd be interested to know it's unicode\>CP mapping. If the operation corresponds to a Windows API function, could you tell us which?

---

<div class="post-metadata">

### Author: ![Chosco](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@Chosco](https://community.mp3tag.de/u/Chosco)
#### Post date: [April 2, 2008, 2:07pm UTC](https://community.mp3tag.de/t/replace-accents/6298/8 "2008-04-02T14:07:12Z")

</div>

Hi, I tired to use the $ansi() function in the parameter of a tool, but doesn't seem to work.

The tool is this (inspired by [this post](https://community.mp3tag.de/t/966/1)):

```
http://www.allmusic.com/cg/amg.dll?p=amg&opt1=2&sql=$replace($ansi(%album%), ,+)

```

I also tried the other way round, just in case, but I doesn't work either:

```
http://www.allmusic.com/cg/amg.dll?p=amg&opt1=2&sql=$ansi($replace(%album%, ,+))

```

Name of the tool (for those interested): AMG - Album  
Path: pointing to "firefox.exe"  
[] for all selected files (not marked)

There seems to be only one way to correct this for me (veeeeeery ad hoc, let's say):

```
http://www.allmusic.com/cg/amg.dll?p=amg&opt1=2&sql=$replace($replace($replace($replace($replace($replace(%album%, ,+),á,a),é,e),í,i),ó,o),ú,u)

```

The album in question is "Verve Jazz Masters 11: Stéphane Grappelli", so the idea of using several $replace function works, but I'd need to modifiy it to allow other characters every time I need it. That's very tedious.

Any other idea?

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [April 2, 2008, 4:43pm UTC](https://community.mp3tag.de/t/replace-accents/6298/9 "2008-04-02T16:43:13Z")

</div>

$ansi only deals with caracters that do not fit in your system codepage  
For example win1252 which you probably have:  
[http://en.wikipedia.org/wiki/Windows-1252](http://en.wikipedia.org/wiki/Windows-1252)  
All these characters stay the same.

Btw $replace does not have to be nested:  
$replace(%album%, ,+,á,a,é,e,í,i,ó,o,ú,u)

---

<div class="post-metadata">

### Author: ![Chosco](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@Chosco](https://community.mp3tag.de/u/Chosco)
#### Post date: [April 3, 2008, 8:06pm UTC](https://community.mp3tag.de/t/replace-accents/6298/10 "2008-04-03T20:06:13Z")

</div>

That's much better, it would be worth adding it to the help file. 😉  
And a function to perform this in a simpler way (directily) would be welcome too.

Thanks dano

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [July 9, 2009, 1:39pm UTC](https://community.mp3tag.de/t/replace-accents/6298/11 "2009-07-09T13:39:50Z")

</div>

> [@chrisjj](#):
>
> I'd be interested to know it's unicode\>CP mapping. If the operation corresponds to a Windows API function, could you tell us which?

Please?

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [July 9, 2009, 1:42pm UTC](https://community.mp3tag.de/t/replace-accents/6298/12 "2009-07-09T13:42:44Z")

</div>

> [@dano](#):
>
> $replace(%album%, ,+,á,a,é,e,í,i,ó,o,ú,u)

Florian, could you please make this function override official? It is not mentioned anywhere in the Help as far as I can see. Thanks.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [July 10, 2009, 12:35pm UTC](https://community.mp3tag.de/t/replace-accents/6298/13 "2009-07-10T12:35:46Z")

</div>

> [@chrisjj](#):
>
> Florian, could you please make this function override official?

It's already mentioned at [Help \> Scripting functions](https://docs.mp3tag.de/scripting).

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [July 10, 2009, 12:57pm UTC](https://community.mp3tag.de/t/replace-accents/6298/14 "2009-07-10T12:57:56Z")

</div>

Oh OK! Sorry.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [July 10, 2009, 1:00pm UTC](https://community.mp3tag.de/t/replace-accents/6298/15 "2009-07-10T13:00:46Z")

</div>

Not a problem at all 🙂

---

<div class="post-metadata">

### Author: ![dgrainge](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@dgrainge](https://community.mp3tag.de/u/dgrainge)
#### Post date: [December 22, 2011, 9:02pm UTC](https://community.mp3tag.de/t/replace-accents/6298/16 "2011-12-22T21:02:04Z")

</div>

I know this is an old topic, but I wanted to add some thoughts on codepage 1252 [or other pages or unicode) and removing accented characters. The samples below should help with most European languages. Removing accents is a very 'English' thing to want to do, and the resulting names will make less sense to other nationalities! However if you have a large music collection, inconsistently tagged over time, it's much easier afterwards to find **all** references to an artist.

I'm copy/pasting from a spreadsheet so I can't be sure the text will look correct or not, and you should try copy/pasting from this page back into your package of choice. Although created in WIndows language=En-UK, I think this will work for many of you. I Can't guarantee the code will make sense after posting - I'll check and the post a file if need be.

If you copy multi-line please remove breaks to make one line of text for each command.

For example:

$replace(%album%,À,A,Á,A,Â,A,Ã,A,Ä,A,Å,A,à,a,á,a,â,a,ã,a,ä,a,å,a,Æ,AE,æ,ae,Ç,C,ç  
,c,È,E,É,E,Ê,E,Ë,E,è,e,é,e,ê,e,ë,e,Ì,I,Í,I,Î,I,Ï,I,ì,i,í,i,î,i,ï  
,  
i,Ñ,N,ñ,n,Ò,O,Ó,O,Ô,O,Õ,O,Ö,O,Ø,O,ò,o,ó,o,ô,o,õ,o,ö,o,ø,o,Œ,OE,œ  
,  
oe,Š,S,š,s,ß,ss,Ð,Th,Þ,Th,ð,th,þ,th,Ù,U,Ú,U,Û,U,Ü,U,ù,u,ú,u,û,u,ü  
,  
u,Ÿ,y,Ý,Y,ý,y,ÿ,y,Ž,Z,ž,z)  
$replace(%artist%,À,A,Á,A,Â,A,Ã,A,Ä,A,Å,A,à,a,á,a,â,a,ã,a,ä,a,å,a,Æ,AE,æ,ae,Ç,C,ç  
,c,È,E,É,E,Ê,E,Ë,E,è,e,é,e,ê,e,ë,e,Ì,I,Í,I,Î,I,Ï,I,ì,i,í,i,î,i,ï  
,  
i,Ñ,N,ñ,n,Ò,O,Ó,O,Ô,O,Õ,O,Ö,O,Ø,O,ò,o,ó,o,ô,o,õ,o,ö,o,ø,o,Œ,OE,œ  
,  
oe,Š,S,š,s,ß,ss,Ð,Th,Þ,Th,ð,th,þ,th,Ù,U,Ú,U,Û,U,Ü,U,ù,u,ú,u,û,u,ü  
,  
u,Ÿ,y,Ý,Y,ý,y,ÿ,y,Ž,Z,ž,z)

Greek:

$replace(%album%,Α,A,Β,B,Γ,G,Δ,D,Ε,E,Ζ,Z,Η,I,Θ,TH,Ι,I,Κ,K,Λ,L,Μ,M,Ν,N,Ξ,X,Ο,O,Π,  
P,Ρ,R,Σ,S,Τ,T,Υ,Y,Φ,PH,Χ,CH,Ψ,PS,Ω,O,α,a,β,b,γ,g,δ,d,ε,e,ζ,z,η,i,

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [December 22, 2011, 10:36pm UTC](https://community.mp3tag.de/t/replace-accents/6298/17 "2011-12-22T22:36:38Z")

</div>

> [@dgrainge](#):
>
> The samples below should help with most European languages.

Useful - thanks.

> [@dgrainge](#):
>
> Removing accents is a very 'English' thing to want to do, and the resulting names will make less sense to other nationalities!

Some others do it too. E.g. SADAIC (Argentina's composers' royalty collection agency) omits all accents from work titles e.g. in its database at www.sadaic.org.ar .

> [@dgrainge](#):
>
> However if you have a large music collection, inconsistently tagged over time, it's much easier afterwards to find **all** references to an artist.

It is also necessary to make filenames that are sure to survive Windows CMD processing or transfer on FAT32 between Windows OSes having different regional settings.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 23, 2011, 6:20am UTC](https://community.mp3tag.de/t/replace-accents/6298/18 "2011-12-23T06:20:59Z")

</div>

> [@dgrainge](#):
>
> Removing accents ...

See also ...  
Unicode to Ascii  
[Unicode to ASCII](https://community.mp3tag.de/t/7279/1)

DD.20111223.0822.CET

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [November 10, 2025, 10:54am UTC](https://community.mp3tag.de/t/replace-accents/6298/19 "2025-11-10T10:54:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
