Coldfusion can't read French accents from text file
Hi all,
I am trying to read some french accents from a text file and i am getting some weird characters from the french accents. I tried applying some encoding thing, but nothing changed. I post below some details of my problem,would be great if you could help me out of it. thanks
I have a text file content as follows:
fileName: msg123.txt
Transfert : Aéroport-Hôtel Paradis
Siège enfant/bébé
PRI en Voiture Privée le 06DEC10
when i use coldfusion to read the file the output is like that:
Transfert : A�roport-H�tel Paradis
Si�ge enfant/b�b�
PRI en Voiture Priv�e le 06DEC10
my CFM who reads the text file looks like that:
fileName: read.cfm
<!--- READS ALL TEXT FILES --->
<cfset pathDirectory = ExpandPath( "./file" ) />
<cfdirectory action="list" directory="#pathDirectory#" filter="*.txt" name="filename"/>
<cfloop query="filename">
<cfset FilePath = "#pathDirectory#/#name#">
<cfscript>
// Define the file to read, use forward slashes only
FileName="#FilePath#";
// Initilize Java File IO
FileIOClass=createObject("java","java.io.FileReader");
FileIO=FileIOClass.init(FileName);
LineIOClass=createObject("java","java.io.BufferedReader" );
LineIO=LineIOClass.init(FileIO);
</cfscript>....
May you please advice me how should i do it correctly?
Regards
Message was edited by: diditin
