Action: Case Conversion • Unexpected Results

Mp3tag v2.88a

I created a Case Conversion Action, with which to capitalize the first letter of a word following a hyphen.



which should change to


once the action is applied.

Action configuration:

Field: _ALL
Case conversion: Mixed Case
Words begin from..: - (hyphen)

When applied, this action leads, thus far, to the following unexpected, undesirable results:

Example, in the Artist Field, containing zero hyphens:

  1. MacNeal will transform to Macneal.

  2. The first letter of a word that follows one of the following punctuations, transforms from upper-case to lower-case: (, [, {.

    Example, in the Artist Field (but same applies to the other fields), containing zero hyphens:

    (Maggie Moniker) becomes (maggie Moniker)
    [Maggie Moniker] becomes [maggie Moniker]
    {Maggie Moniker} becomes {maggie Moniker}

Could someone please explain to me why this is happening, and propose a solution?

Thank you.

Once you start to change the case, you have to state ALL the characters that serve as word boundaries - otherwise they are treated like any other character
The case conversion "Mixed Case" means that every first letter in a word gets capitalized.
and in the string

the "(" is the first letter and "m" is the second one, which becomes lower case.
A "blank" always serves as word boundary.

So for the case of "MacNeal", it may be better to use an action of the type "Format value" for the e.g. TITLE and then the
format string: $caps2(%title%,'-(&%!.:;')
This leaves all capital letters as they are and only changes those that follow one that is specified as word boundary

Thank you for your explanation Ohrenkino. I think I understand the get the gist of it now. I had thought that when boundary is specified for this particular action, it will apply to the words containing the boundary only, i.e. the hyphen in this case. I expected anything else to be left alone.

Initially, I posted this topic:

Expression Needed to Change Hyphenated Word Capitalisation.

Is it not preferable then, to use a regular expression to take care of hyphenated words- one which will not touch anything else but hyphenated words- rather than setting up and applying an elaborate Case Conversion action to take care of all possible scenarios? Would you please help with that?

Regexes are usually a little confusing
But here we go:
You have to enter the boundary character twice: in the search part and the replace part.
Use it in Convert>tag-Tag or in an action of the type "Format value".

Indeed. Thank you Ohrenkino.