View Single Post
Old 25th October 2003, 22:38   #218  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Quote:
Originally posted by Mosu
Thanks. Unfortunately I cannot reproduce this - I get 'abcdefg' (normal output).
I get "abcdefg" too if I set "language for non-unicode programs" = "English" This can be actually another problem
because the string is not abcdefg but ab(U+FF41 U+FF42)...

anyway the first problem is not fixed in this newest beta, as long as I'm in the same mode (language for non-unicode programs = japanese)

Quote:
Anyway, I've added a new option, '--command-line-charset'. With it you can set the charset that is used in the conversion to UTF-8 for strings given on the command line. It applies to the '--title' (mmg: "segment title", global tab), '--track-name' (mmg: "track name", input tab) and '--attachment-description' options. It can be set in mmg on the global tab.
This does work sometimes, but not always.
Let's just think about '???????' where the single quotation mark = 0x27, but there can be 0x27 in ???? thanks to U+27xx and U+xx27. This way, this can't work in UTF-16, and the same goes for some other encodings.
Another confusing problem is, Windows is meddling when it passes a string input/output, to/from mkvmerge...it'll convert charset by itself (in a lossy way, for instance ä will be converted to a if the codepage=japanese, and one Kanji will be converted to 2 meaningless alphabets if the codepage!=japanese)...plus you should hack the clipboard encoding if you'd like to enable one to paste something in unicode into the editbox in mmg...otherwise, windows defaults the clipboard encoding to "Lanugage for non-unicode program"
so...probably the safest way is not very cool:

--title @somefile.utf8.txt

Quote:
This way you can have your batch file in UTF-8 like this:

Code:
@rem .bat in UTF-8

mkvmerge -o output.mkv input.avi --title 'something with UTF-8 coded characters' --command-line-charset UTF-8
Hmmm, in a bat file? well, utf-8 could be possible, but utf-16 will be impossible this way (in bat) because cmd.exe can't find mkvmerge as it'd think the command line would be "m k v m e r g e"

BUT, more importantly,,,,,,, finally SUB+IDX is coming!!

Here's a cosmetic thing:
i suppose "Subtitle charset" list in mmg should be disabled if the track is S_VOBSUB
Liisachan is offline