mahmood Posted October 30, 2007 Share Posted October 30, 2007 I am trying to read a XML file which contains some french characters for example: <Title>La France virile: Des femmes tondues à la Libération</Title> The following script is used to read out the file: $contents = file_get_contents($file);echo $contents; The problem is that à la Libération changes to tondues à la Libération How can I get correct these strange characters? Link to comment https://forums.phpfreaks.com/topic/75414-strange-file_get_contents-output-%C3%A3-la-lib%C3%A3%C2%A9ration/ Share on other sites More sharing options...
effigy Posted October 30, 2007 Share Posted October 30, 2007 Make sure you use UTF-8 when displaying the data: <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> Link to comment https://forums.phpfreaks.com/topic/75414-strange-file_get_contents-output-%C3%A3-la-lib%C3%A3%C2%A9ration/#findComment-381493 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.