# Character remapping during conversion?

**URL:** https://community.mp3tag.de/t/character-remapping-during-conversion/13037
**Category:** Support
**Created:** [February 1, 2012, 6:36pm UTC](https://community.mp3tag.de/t/character-remapping-during-conversion/13037 "2012-02-01T18:36:43Z")
**Posts on this page:** 1
**Showing post:** 5

<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 1, 2012, 7:38pm UTC](https://community.mp3tag.de/t/character-remapping-during-conversion/13037/5 "2012-02-01T19:38:08Z")

</div>

> [@deckard](#):
>
> ... whenever I convert Tag \> Filename, this will occur, and any other invalid characters can be remapped to something else as well (colon to semicolon, quotes to 2 single quotes, etc.). A global setting for character remapping when naming files would be ideal.  
> ...

**$validate** 

Usage: $validate(,)

 

Following invalid characters will be replaced with ReplaceChar:  
034 "  
042 \*  
047 /  
058 :  
060 \<  
062 \>  
063 ?  
124 |

 

"\*/:\<\>?|

 

$validate allows the colon to exist at position 2 counted from the left edge of the string, when used as the separator for the drive letter.

 

"E:\abc"  
... is allowed

 

**" E:\abc"  
... is not allowed and will give ...  
" E\_\abc"**

 

Examples:

  **Clean Path $validate($regexp('x ... E: \ ... Music \ ...\ ... Artist \*2\*\ Title 3 ... x','(?:^|(?\<=\\\\))[.]+|[.]+(?:(?=\\\\)|$)',),'\_') Result = "x ... E\_\Music\_Album 1\_\Artist \_2\_\Title 3 ... x" $validate($regexp(' ... E: \ ... Music \ ...\ ... Artist \*2\*\ Title 3 ... ','(?:^|(?\<=\\\\))[.]+|[.]+(?:(?=\\\\)|$)',),'\_') Result = "E:\Music\_Album 1\_\Artist \_2\_\Title 3" Note: $validate respects the colon at the second string position. $validate($regexp(' ... E: \ ... Music \ ...\ ... Artist \*2\*\ Title 3 ... ','(?:^|(?\<=\\\\))[.]+|[.]+(?:(?=\\\\)|$)',),) Result = "E:\Music\Album 1\Artist 2\Title 3" Note: $validate respects the colon at the second string position.**  **$replace** 

The function $replace(,,) is case-sensitive.  
To this function a plurality of 'from,to' pairs can be passed:

 $replace(string,from,to[,from,to]...)

Example:

 **$replace(%TEST%,'ä','ae','ö','oe','ü','ue','Ä','Ae','Ö','Oe','Ü','Ue','ß','ss')** 

DD.20120201.2145.CET

---

_[View the full topic](https://community.mp3tag.de/t/character-remapping-during-conversion/13037)._
