convert charset encoding

This thread is a bit old, but I think the problem keeps coming back from time to time.
Example:
There is some tag-field having this text: Ôîðòåïèàííûå ìèíèàòþðû
Somehow this seems not be the correct character encoding.

Mp3tag has the action "codepage convert", ...
but how would someone know which code page is the right one?
Sometimes one can derive the answer from the context of the media files, or from the album title or other evidences.
But there is no technical assistance from within Mp3tag, but maybe by other software?

Hmm, sure, because it is a rather old question, and this goes back to the Stone Age of DOS, and the implementation of the so called code pages.
Nowadays, there exist some really full-fledged software for the detection of languages.
But I thought, keep it simple for Mp3tag, and I was looking for a brute force method, ...
Then I found something out, what may help.

The idea is, to convert the unknown language "Ôîðòåïèàííûå ìèíèàòþðû" into some other languages, using known codepage conversions.
After the conversion, the user has to decide which is the correct encoding, ... and this way ...
the correct code page number can be retrieved in short time of automated experimentation.
So this is a semi-automatic process of trial and error.

I wrote a DOS batch command script, which utilizes the well known command line tool "iconv.exe".
The tool receives the unknown string and makes the conversion into a specific code page.
This procedure is repeated several times, with different codepages.
At the end there are some results, ... and the user has to decide, which one is the right one, based on the high probability of the test result.
Now with the right codepage number known, it is easy to tell Mp3tag to apply the correct codepage number.

It is a 3-step process.

  1. Put the unknown text into a text file.
  2. Run the batch command script.
  3. Look at the result page, and find the correct target codepage number.

Then this codepage number can be used within Mp3tag action "Codepage convert" to fulfill the correct character conversion.

"Ôîðòåïèàííûå ìèíèàòþðû" ==> CP1251 ==> "Фортепианные миниатюры"

Installer "CheckCP.exe"
http://1drv.ms/1IftYrq

Have fun!
DD.20150405.0638.CEST

If someone need this procedure (step 1 to 3) more often, then the whole process can be summarized and prepared within a Mp3tag export script.
The export script receives from the tag field in question the text value, ...
then generates the batch script, ...
which will start automatically ...
and delivers the desired result, ..
this is the text file with the comparison of the code pages.

All this could be done 'native' by Mp3tag, ...
of course with some more programming effort, ...
so Mp3tag could calculate the correct answer immediately, ...
without the need of a list of different codepages, ...
which have to be examined by user interaction.

DD.20150405.2216.CEST

There is a Mp3tag export script, ...
which starts a codepage check for the tag-field ALBUM ...
Export.CMD.20150406.CheckCodepage.ALBUM.mte ( 2.46K ) Number of downloads: 3
The cmd batch script has a for loop, using a !variable! instead of %variable%, ...
and the script should work on Win XP machine too, ...
but "EnableDelayedExpansion" is "disabled" by default, this was on Win XP.
For systems after Win XP the "EnableDelayedExpansion" mode may be the default mode.
To be sure, the missing batch code has been added now.
"EnableDelayedExpansion" may also be enabled by starting CMD with the /v switch.
"EnableDelayedExpansion" can also be set in the registry under HKLM or HKCU:
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"DelayedExpansion"= (REG_DWORD)
1=enabled 0=disabled

There is a Mp3tag export script, ...
which starts a codepage check for the tag-field ALBUM ...

Export.CMD.20150406.CheckCodepage.ALBUM.mte (2.79 KB)
DD.20150406.1747.CEST, DD.20150407.1451.CEST

Export.CMD.20150406.CheckCodepage.ALBUM.mte (2.79 KB)