Balazs_noob
August 9th, 2007, 05:58 PM
Hi guys
i am just started to learn Spanish and i have decided, that because
i am learning Java too i will write a software that will help me remember the words :)
it would just write the word in English and i would have to write the word in Spanish and it would check if it is good or not...
but i have a problem with reading in non-English characters
like á from the text file, it shows some other weird symbol :(
Hope somebody can help a poor student :)
Here is the code:
import java.io.*;
public class Input {
public static void main(String[] args) throws IOException {
BufferedReader inputStream = null ;
try {
inputStream = new BufferedReader (new FileReader("spanish.txt"));
String str ;
while ((str = inputStream.readLine())!=null){
System.out.println(str);
}
} catch(FileNotFoundException e) {
System.out.println("Bad file name!!");
} finally {
if (inputStream != null) {
inputStream.close();
}
}
}
}
i think i would need to change the char set
i am just started to learn Spanish and i have decided, that because
i am learning Java too i will write a software that will help me remember the words :)
it would just write the word in English and i would have to write the word in Spanish and it would check if it is good or not...
but i have a problem with reading in non-English characters
like á from the text file, it shows some other weird symbol :(
Hope somebody can help a poor student :)
Here is the code:
import java.io.*;
public class Input {
public static void main(String[] args) throws IOException {
BufferedReader inputStream = null ;
try {
inputStream = new BufferedReader (new FileReader("spanish.txt"));
String str ;
while ((str = inputStream.readLine())!=null){
System.out.println(str);
}
} catch(FileNotFoundException e) {
System.out.println("Bad file name!!");
} finally {
if (inputStream != null) {
inputStream.close();
}
}
}
}
i think i would need to change the char set