[solved] 5420 + charset encoding

Mission accomplished!
User avatar
DoCC
Contributor
Contributor
Posts: 211
Joined: 25 Feb 2014, 14:41
Has thanked: 40 times
Been thanked: 65 times

[solved] 5420 + charset encoding

Unread post 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 ?
These users thanked the author DoCC for the post:
Madsonic
Rating: 7.69%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: 5420 + charset encoding

Unread post 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
These users thanked the author Madsonic for the post:
DoCC
Rating: 7.69%
Post Reply