Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

UTF-8 file reading: the first character issue

807580May 18 2010 — edited May 25 2010
Hi,
A file foo.sql is saved as UTF-8 encoding using Windows notepad.

Then the following code did not read the text content correctly.

InputStreamReader isr = new InputStreamReader(new FileInputStream("foo.sql"), "UTF-8");
BufferedReader reader = new BufferedReader(isr);
String line = reader.readLine();

From debug, the first character is not displayable. for example,

foo.sql
----------
create table school

the line from BufferedReader is
?create table school

the question mark means the char is not displayable. What is the correct way to read UTF-8 encoded text file?

Thanks for help.
Dave

Comments

Toni Lazarin
user1983888 wrote:
Hi,
We want to know if Oracle 10g R2 RAC is supported on Windows 2008 (64-Bit)?
Yes.
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10204_winx64_vista_win2k8.html
Check 782795.1 RAC on Windows: Oracle Clusterware Installation Steps Particular for Windows 2008 Clusters
user1983888
Thanks.
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 22 2010
Added on May 18 2010
7 comments
4,196 views