# Feature request- replace accented characters with ASCII

**URL:** https://community.mp3tag.de/t/feature-request-replace-accented-characters-with-ascii/10153
**Category:** General Discussion
**Created:** [March 21, 2010, 6:24am UTC](https://community.mp3tag.de/t/feature-request-replace-accented-characters-with-ascii/10153 "2010-03-21T06:24:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![indulis](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@indulis](https://community.mp3tag.de/u/indulis)
#### Post date: [March 21, 2010, 6:24am UTC](https://community.mp3tag.de/t/feature-request-replace-accented-characters-with-ascii/10153/1 "2010-03-21T06:24:09Z")

</div>

Very good piece of software- thanks!

It would be good to have a feature to replace all accented characters with non-accented versions. I have an Audiotron MP3 audio player which only understands USA characters (ie ASCII 7-bit, first 128 chars). It crashes as soon as it gets an accented char in the filename!

Here is exactly what I'm after- I could do the regexp but it would be v ugly!  
[http://www.actionscript.org/forums/showthread.php3?t=211442](http://www.actionscript.org/forums/showthread.php3?t=211442)

Maybe an ascii7() function?

This is my convert tag-filename function now

```
$trim($left($replace($ansi($num(%track%,3)--$mid(%artist%,1,15)--
$mid(%album%,1,15)--$mid(%title%,1,20))
,Ç,c,ç,c,ü,u,û,u,ú,u,ù,u,e,e,ê,e,ë,e,è,e,â,a,ä,a,à,a,å,a,á,a,ã,a,
ï,i,
î,i,ì,i,í,i,Ä,A,Å,A,É,E,æ,ae,Æ,Ae,ô,o,ö,o,ò,o,ó,o,Ü,U,ÿ,y,ñ,n,Ñ,
N
,é,e),60))

```

In the code above the number of replacements I am using seems to run over an internal limit- if I remove any 3 replacement pairs then the last é to e conversion works. If I leave the function as it is then it does not work.

If I split the $replace function into 2 separate replace functions it works! (see below)

```
$trim($left(
$replace(
$replace(
$ansi($num(%track%,3)--
$mid(%artist%,1,15)--$mid(%album%,1,15)--%title%)
,Ç,c,ç,c,ü,u,û,u,ú,u,ù,u,e,e,ê,e,ë,e,è,e,â,a,ä,a,à,a,å,a,á,a,ã,a,
ï,i,î,i,ì,i,í,i,Ä,A,Å,A,É,E)
,æ,ae,Æ,Ae,ô,o,ö,o,ò,o,ó,o,Ü,U,ÿ,y
,ñ,n,Ñ,N,é,e,!,,'',,'(',,')',,., ,',', ,&,and,':',-)
,60))

```

It is a tribute to your program that I can even do this (although in this case not so easily 😉 )

---

<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: [March 21, 2010, 12:32pm UTC](https://community.mp3tag.de/t/feature-request-replace-accented-characters-with-ascii/10153/2 "2010-03-21T12:32:40Z")

</div>

> [@indulis](#):
>
> ... Very good piece of software- ...

To replace character ranges you can use action "Replace with regular Expression", e. g.

_Actiontype 4:_ **Replace with regular expression**  
_Field:_ **YOUR\_TAG\_FIELD**  
_Regular expression:_ **[à-æ]**  
_Replace matches with:_ **a**

[X] Case sensitive comparison

_Actiontype 4:_ **Replace with regular expression**  
_Field:_ **YOUR\_TAG\_FIELD**  
_Regular expression:_ **[Ò-ÖØ]**  
_Replace matches with:_ **O**

[X] Case sensitive comparison

DD.20100321.1435.CET
