function del_secchars($file) { global $cn_seg, $jp_seg, $del_secchars, $del_seccharin; if ($jp_seg == '1' || $cn_seg == '1' && $del_secchars == 1 || $del_seccharin == 1) { // Delete additional characters (as word separator) like dots, question marks, colons etc. (characters 1-49 in original Chinese dictionary) $file = preg_replace('/。|,|〿|;|:|?|_|…|—|·|ˉ|ˇ|¨|‘|’|“|‿|々|~|‖|∶|"|'|`|||〃|〔|〕|〈|〉|《|》|「|〿|『|〿|.|〖|〗|〿|】|(|)|[|]|{|ソ/', " ", $file); $file = preg_replace('/ï¼›|¡£|£¬|¡¢|£»|£º|£¿|£¡|¡|¡ª|¡¤|¡¥|¡¦|¡§|¡®|¡¯|¡°|¡±|¡©|¡«|¡¬|¡Ã|£¢|£§|£à|£ü|¡¨|¡²|¡³|¡´|¡µ|¡¶|¡·|¡¸|¡¹|¡º|¡»|£®|¡¼|¡½|¡¾|¡¿|£¨|£©|£Û|£ÿ|£û|£ý|°¢/', " ", $file); $file = preg_replace('/_|&|,|<|:|;|・|\\(|\\)/', " ", $file); } if ($del_secchars == '1') { // kill special characters at the end of words $file = preg_replace('/— |\\]. |\\%\\? |\\"\\. |, |.\'|\\. |\\.\\. |\\.\\.\\. |! |\\? |" |: |\\) |\\), |\\)\\. |】 |) |?,|? |! |!|。,|。 |„ |“ |” |”|” |» |\\.»|;»|:»|,»|\\.»|·»|«|« |», |»\\. |\\.” |,”|;” |”\\. |”, |‿|、|)|·|;|\\] |\\} |_, |_ |”\\)\\. |.\\"> |\\"> |> |\\)|< |\\%, |\\%. |\\%.\\" |\\% |\\+\\+ |\\+ |\\* |\\# |\\~ /', " ", $file); // kill special characters in front of words $file = preg_replace('/ —| \\(\\"| \\(\\$| \\(\\@| \\@| \\[| "| \\(| „|„| “|(| «| 【| ‿| (| \\(“|“| ©| ®| ™| –| <| \\/|\\/| \\"| \\.| \\^| >| \\$| \\£| \\"\\(| \\+| \\*| \\.| \\#| \\%| \\~| \\{/', " ", $file); } if ($del_seccharin == '1') { $file = del_secintern($file); } return $file; }
$id3_string = @iconv($charSet, "UTF-8//IGNORE", $id3_string); $title_orig = $title; $title_trans = $title; $id3_trans = $id3_string; $title .= $delim; $id3_string .= $delim; // kill all secondary characters from title tag and EXIF info if ($del_seccharin) { $title_rem = $title_trans; $id3_rem = $id3_trans; $title_trans = del_secintern($title_trans); if ($title_trans != $title_rem) { $title .= " " . $title_trans . ""; // add new words to title } $id3_trans = del_secintern($id3_trans); if ($id3_trans != $id3_rem) { $id3_string .= " " . $id3_trans . ""; // add new words to EXIF info } } // convert to lower case if ($case_sensitive == '0') { $title_rem = $title_trans; $id3_rem = $id3_trans; $title_trans = lower_case(lower_ent($title_trans)); if ($title_trans != $title_rem) { $title .= " " . $title_trans . ""; // add new words to title } $id3_trans = lower_case(lower_ent($id3_trans));