8
           
            
                
     
    
    While I'm solving the problems with encoding you can comment the XK_replaceCharacters function and the characters array:
 function XK_codeCleaner(text)  
{         
    //replace characters 
    //text = XK_replaceCharacters(text);  
 //var htmlcharacters = ['€','‘','’','“','”','–' 
//var characters = ['€','‘','’','“','”','–','—... 
','¡','¢','£','£','¤','¥','¦...