Инструменты пользователя

Инструменты сайта



Special function, setting the list of fields, for which encoding fix will be be applied.

FixCodepage(FieldID1 [, FieldID2 .. [, FieldIDN]])
FieldID1..NList of Field ID's, that should be fixed.

Function not return values.


Problem with wrong encoding appearing on files with ID3-tag, where strings are saved in ANSI-encoding, different from ISO 8859-1. Official specification of ID3 tag allow to use ANSI ISO 8859-1 or unicode, however years before, in times of Windows95/98, many programs are ignored specifications and saved tags in local ANSI-encodings. MediaInfo strictly follow the specifications and decode ANSI-strings with ISO 8859-1 codepage, but this cause wrong text displayed on incorrectly saved tags.

Unfortunately, MediaInfo author is refused to make any options to workaround this problem. So in plugin was implemented not the most beautiful and fast, but working method of defining and recoding text from incorrectly saved tags. Unreasonable to apply this method to all fields. Only use it for fields that can return wrongly encoded text (usually title, author etc.). Function should be called at beginning of script, before those fields will be retrieved, function work till the end of script execution.

Text, that function will define as wrong, will be decoded with your local ANSI settings. Of course, if text was saved with codepage different then your system ANSI-encoding, text can be still unreadable.

en/tcmediainfo/documentation/script_fixcp.txt · Последнее изменение: 2019/02/12 19:03 — loopback

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki