Page 1 of 1

[solved] 5420 + charset encoding

Posted: 10 Jan 2015, 13:36
by DoCC
Hi Mad ,
encoding.PNG
Are you able to handle this crap ? : P

i use some stuff like this :

Code: Select all


			if ( !function_exists('mb_detect_encoding') ) { 


				function mb_detect_encoding ($string, $enc=null, $ret=null) { 
       
				static $enclist = array( 
				'UTF-8', 'ASCII', 
				'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4', 'ISO-8859-5', 
				'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9', 'ISO-8859-10', 
				'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', 
				'Windows-1251', 'Windows-1252', 'Windows-1254', 
				);
        
				$result = false; 
        
				foreach ($enclist as $item) { 
				$sample = iconv($item, $item, $string); 
				if (md5($sample) == md5($string)) { 
					if ($ret === NULL) { $result = $item; } else { $result = true; } 
					break; 
				}
				}
        
				return $result; 
				}
			}
				
			function str_to_utf8 ($str) { 
    
				if (mb_detect_encoding($str, 'UTF-8', true) === false) { 
				$str = utf8_encode($str); 
				}

				return $str;
			}
Maybe there is a chance to get this working in coming version ?

Re: 5420 + charset encoding

Posted: 04 May 2015, 17:25
by Madsonic
it's more a problem how the tag is written to the metadata
2015-05-04 18_10_04-Mp3tag v2.70  -  F__MEDIA_Test_Unicode_.png