komputer
asked on
reading text file problem
hi,
i need to read text files and store into database. i can read but i have problem with this turkish characters; Şşİı&# 286;ğ . So i cant store properly. what should i do?
thanks...
i need to read text files and store into database. i can read but i have problem with this turkish characters; Şşİı&#
thanks...
use utf8 encoding to store it
You need to use UTF8 in the db
generally you can specify the encoding oin your connection string
ASKER
my code to read txt file below;
try {
BufferedReader in = new BufferedReader(new FileReader(fileName));
String data = "";
while ((str =in.readLine()) != null) {
data += str;
}
}
in.close();
} catch (IOException e) {
}
where should i change?
sorry i am new at java.
try {
BufferedReader in = new BufferedReader(new FileReader(fileName));
String data = "";
while ((str =in.readLine()) != null) {
data += str;
}
}
in.close();
} catch (IOException e) {
}
where should i change?
sorry i am new at java.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>you'll also need to specify ewncoding when saving to database
could you send me the needed connection string please?
could you send me the needed connection string please?
depends on your database
ASKER
for oracle?
don't think you need anything special for oracle :)
ASKER
thanks guys...
:-)
ASKER
justice for all ;)