# Replace two single quotes with one double quote

**URL:** <https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005>\
**Category:** Support\
**Created:** [October 16, 2012, 11:02pm UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005 "2012-10-16T23:02:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThurstonX](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@ThurstonX](https://community.mp3tag.de/u/ThurstonX)\
**Post date:** [October 16, 2012, 11:02pm UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/1 "2012-10-16T23:02:37Z")

</div>

Hi, all.

Just finished beating my head against the wall for something trivial, so I thought I'd post in case someone else comes up against it.

The scenario:

I have an action that uses the FILENAME to create the TITLE tag. It gets applied last, after case conversion and other actions.

As double quotes are illegal in file names, I use two single quotes to represent things like:  
07 - More Than This (7'' Version)

but I want to use one double quote (") in the TITLE tag. I added a REPLACE action to deal with it, but I added it to my list of "standard" actions, which are applied to ALL fields and run before the last "Convert FILENAME to TITLE tag" action. That had the effect of undoing the REPLACE.

Separating the "Single Quotes to Double Quote" REPLACE to its own action and placing it after the "Convert FILENAME to TITLE tag" action caused my head to stop hurting 😉

---

<div class="post-metadata">

**Author:** ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)\
**Post date:** [October 16, 2012, 11:24pm UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/2 "2012-10-16T23:24:52Z")

</div>

I don't know whether this helps much, but I always handle this in the opposite direction. That is, I always set my TITLE to be whatever I like (since no characters are off limits), then I use a $replace() function to replace illegal characters in a _Rename File_ action group. The _Rename File_ action group is always run at the end of the standard check list when I do anything.

_Action type:_ **Format value**  
_Field:_ **\_FILENAME**  
_Format string:_ **$num(track%,2) $replace(%title%,/, - ,?,,",'',,-,:,-,\*,-,\<,-,\>,-,|,-)**

Note: Mp3tag has a $validate() function, which replaces all illegal filename characters with dashes. I choose to use the $replace() function shown above to have more control, such as changing double-quotes to two single quotes.

---

<div class="post-metadata">

**Author:** ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)\
**Post date:** [October 16, 2012, 11:30pm UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/3 "2012-10-16T23:30:27Z")

</div>

BTW, the above action may give you a hint at a different way of doing it. Instead of using a _Replace_ action, you might find it easier using a $replace() function within a _Format Value_ action.

_Action type:_ **Format value**  
_Field:_ **TITLE**  
_Format string:_ **$replace(%title%,'',")**

---

<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:** [October 17, 2012, 2:53am UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/4 "2012-10-17T02:53:27Z")

</div>

> [@ThurstonX](#):
>
> ... Just finished beating my head against the wall for something trivial ... I have an action that uses the FILENAME to create the TITLE tag. It gets applied last, after case conversion and other actions.  
> As double quotes are illegal in file names, I use two single quotes to represent things like:  
> 07 - More Than This (7'' Version) ... but I want to use one double quote (") in the TITLE tag. ...

I recommend to use a workflow that works from ... filename/websource/typing ... to tag-field to filename.  
At the very end of the work chain the filename can be assembled from the tag-field values.  
Special characters, which are forbidden within the filesystem, can be replaced or removed without touching already well formed tag-fields.

Mp3tag supports unicode characters and some filesystems support unicode characters in filenames.  
Therefore a bunch of special characters are allowed in filenames too.

For example see ...  
[http://en.wikipedia.org/wiki/Prime\_(symbol)](http://en.wikipedia.org/wiki/Prime_(symbol))  
[http://www.fileformat.info/info/unicode/char/2033/index.htm](http://www.fileformat.info/info/unicode/char/2033/index.htm)  
[http://www.unicode.org/charts/PDF/U2000.pdf](http://www.unicode.org/charts/PDF/U2000.pdf)

_The prime symbol ( ′ ), double prime symbol ( ″ ), and triple prime symbol ( ‴ ), etc., are used to designate several different units, and for various other purposes in mathematics, the sciences, linguistics and music. The prime symbol should not be confused with the apostrophe, single quotation mark, acute accent or grave accent; the double prime should not be confused with the double quotation mark,[1] the ditto mark, or the letter double apostrophe._

On the filesystem NTFS it is possible to create a filename having unicode characters.  
For example:  
This song has 3′ 5″ music (7″ Version).mp3

DD.20121017.0650.CEST

---

<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:** [October 17, 2012, 11:47am UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/5 "2012-10-17T11:47:11Z")

</div>

> [@ThurstonX](#):
>
> ... which are applied to ALL fields and run before the last "Convert FILENAME to TITLE tag" action. That had the effect of undoing the REPLACE. ...

Be aware of the pseudo tag-fields \_ALL and \_TAG and their different scope.  
\_ALL includes the filename, \_TAG excludes the filename.

DD.20121017.1544.CEST

---

<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 10, 2015, 9:18am UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/6 "2015-02-10T09:18:26Z")

</div>

> [@ThurstonX](#):
>
> ... As double quotes are illegal in file names, I use two single quotes to represent things like: 07 - More Than This (7'' Version) but I want to use one double quote (") in the TITLE tag. ...

**Replace two single quotation marks (single apostrophes) with one double quotation mark ... $replace(%TITLE%,'''','"') ... or ... $replace(%TITLE%,'''',") ... or ... $replace(%TITLE%,$char(39)$char(39),'"') ... or ... $replace(%TITLE%,$char(39)$char(39),$char(34))**

DD.20150210.1119.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:** [February 9, 2026, 12:24pm UTC](https://community.mp3tag.de/t/replace-two-single-quotes-with-one-double-quote/14005/7 "2026-02-09T12:24:07Z")

</div>

Closed on February 9, 2026, 12:24pm UTC


