# Format string to replace characters with accents

**URL:** https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298
**Category:** Support
**Created:** [October 18, 2024, 3:40am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298 "2024-10-18T03:40:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![dreaminh](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@dreaminh](https://community.mp3tag.de/u/dreaminh)
#### Post date: [October 18, 2024, 3:40am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/1 "2024-10-18T03:40:11Z")

</div>

Hi there,

I am working on a format string to replace accents/special characters (mostly from Vietnamese) with normal characters so I can search for them on Piooner devices.

Here is the full format string:

> $validate($replace( %title%,ä,a,á,a,à,a,ả,a,ã,a,ạ,a,â,a,ấ,a,ầ,a,ẩ,a,ẫ,a,ậ,a,ă,a,ắ,a,ằ,a,ẳ,a,ẵ,a,ặ,a,ë,e,é,e,è,e,ẻ,e,ẽ,e,ẹ,e,ê,e,ế,e,ề,e,ể,e,ễ,e,ệ,e,í,i,ì,i,ỉ,i,ĩ,i,ị,i,ö,o,ó,o,ò,o,ỏ,o,õ,o,ọ,o,ô,o,ố,o,ồ,o,ổ,o,ỗ,o,ộ,o,ơ,o,ớ,o,ờ,o,ở,o,ỡ,o,ợ,o,ü,u,ú,u,ù,u,ủ,u,ũ,u,ụ,u,ư,u,ứ,u,ừ,u,ử,u,ữ,u,ự,u,đ,d,ñ,n,Ä,A,Á,A,À,A,Ả,A,Ã,A,Ạ,A,Â,A,Ấ,A,Ầ,A,Ẩ,A,Ẫ,A,Ậ,A,Ă,A,Ắ,A,Ằ,A,Ẳ,A,Ẵ,A,Ặ,A,Ë,E,É,E,È,E,Ẻ,E,Ẽ,E,Ẹ,E,Ê,E,Ế,E,Ề,E,Ể,E,Ễ,E,Ệ,E,Í,I,Ì,I,Ỉ,I,Ĩ,I,Ị,I,Ö,O,Ó,O,Ò,O,Ỏ,O,Õ,O,Ọ,O,Ô,O,Ố,O,Ồ,O,Ổ,O,Ỗ,O,Ộ,O,Ơ,O,Ớ,O,Ờ,O,Ở,O,Ỡ,O,Ợ,O,Ü,U,Ú,U,Ù,U,Ủ,U,Ũ,U,Ụ,U,Ư,U,Ứ,U,Ừ,U,Ử,U,Ữ,U,Ự,U,Đ,D,Ñ,N,ç,c,ß,ss,œ,oe,Œ,OE,),)

Here are all the special characters so you can test them:

> ä,á,à,ả,ã,ạ,â,ấ,ầ,ẩ,ẫ,ậ,ă,ắ,ằ,ẳ,ẵ,ặ,ë,é,è,ẻ,ẽ,ẹ,ê,ế,ề,ể,ễ,ệ,í,ì,ỉ,ĩ,ị,ö,ó,ò,ỏ,õ,ọ,ô,ố,ồ,ổ,ỗ,ộ,ơ,ớ,ờ,ở,ỡ,ợ,ü,ú,ù,ủ,ũ,ụ,ư,ứ,ừ,ử,ữ,ự,đ,ñ,Ä,Á,À,Ả,Ã,Ạ,Â,Ấ,Ầ,Ẩ,Ẫ,Ậ,Ă,Ắ,Ằ,Ẳ,Ẵ,Ặ,Ë,É,È,Ẻ,Ẽ,Ẹ,Ê,Ế,Ề,Ể,Ễ,Ệ,Í,Ì,Ỉ,Ĩ,Ị,Ö,Ó,Ò,Ỏ,Õ,Ọ,Ô,Ố,Ồ,Ổ,Ỗ,Ộ,Ơ,Ớ,Ờ,Ở,Ỡ,Ợ,Ü,Ú,Ù,Ủ,Ũ,Ụ,Ư,Ứ,Ừ,Ử,Ữ,Ự,Đ,Ñ,ç,ß,œ,Œ.

It works until the last "e"; everything after it will not be replaced.

Could someone help me out? I am not a coder so I don't know if I did something wrong with it or maybe I have exceeded the maximum number of characters that could be replaced.

Thank you!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [October 18, 2024, 5:46am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/2 "2024-10-18T05:46:50Z")

</div>

You have to split $replace() into several statements. The one that you present is too long as it exceeds the maximum 64 parameters.  
 ![grafik](https://community.mp3tag.de/uploads/default/original/3X/4/9/491e9c0add28eb7e26c7307ab7212476e3beab9f.png)  
From:

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![dreaminh](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@dreaminh](https://community.mp3tag.de/u/dreaminh)
#### Post date: [October 18, 2024, 9:00am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/4 "2024-10-18T09:00:52Z")

</div>

Could you please tell me how to split them into several statements?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [October 18, 2024, 9:07am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/5 "2024-10-18T09:07:28Z")

</div>

You have to create an action group with several actions that feature the $replace function.  
You have probably already created an action group to house the initial $replace.  
Now edit that group and copy the existing action a couple of times.  
Then edit each of the copies and delete all the pairs that have been dealt with in another (copy of the) action.  
A good measure is to use no more than 30 replace-pairs per action call.  
Finally, save the action group with OK.

---

<div class="post-metadata">

### Author: ![dreaminh](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@dreaminh](https://community.mp3tag.de/u/dreaminh)
#### Post date: [October 18, 2024, 9:29am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/6 "2024-10-18T09:29:57Z")

</div>

Thank you!

![image](https://community.mp3tag.de/uploads/default/original/3X/2/6/268f4f0e0c075ca3bcf70f748c6444d5ccef11f4.png)

I am at this point. Do I have to enter each pair or is there a way to enter 30 pairs at once like you said?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [October 18, 2024, 9:32am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/7 "2024-10-18T09:32:20Z")

</div>

If you want to use $REPLACE() then you have to use an action that allows a format string, e.g. "Format value".  
Also, I would not use \_TAG as target for the replacement but dedicated fields.  
The function to copy actions should make that an easy option.

---

<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 17, 2024, 9:32am UTC](https://community.mp3tag.de/t/format-string-to-replace-characters-with-accents/66298/8 "2024-11-17T09:32:36Z")

</div>

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