Hi,
If you read using UTF-8 and then write specifying UTF-8 there should not be a 
problem.
But Windows does not use UTF-8 by standard I think it uses CP1252 or similar. 
And a command window (cmd) uses the windows setting. When you write a file in 
utf-8 an then display it in the command window you will see differencies as you 
described. 

Mit freundlichen Grüßen 
Helmut Leininger 

Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Am 31. Oktober 2022 21:27:24 MEZ schrieb "Greenberg, Gary" 
<ggree...@visa.com.INVALID>:
>I have created an application that reads data from the CSV file, process it 
>and write it into another file.
>It is working fine except one thing. German characters are being replaced. For 
>example instead of leiüzig I see lei�zig
>Same replacement I see in debugger when I stop it after reading a line from 
>file.
>I do have in my code
>Reader rdr = BufferedReader(new InputStreamReader(new FileInputStream(file), 
>"UTF-8"));
>Later this Reader is used to build CSVReader (from OpenCsv library).
>
>I want to be sure that that problems are in my code and not how debugger 
>displays it.
>I haven’t delt with foreign characters encoding before, so please forgive my 
>ignorance.
>I would gladly accept advice on my code as well.
>
>I am running NB12.5 on OpenJDK 16 on Windows, but application is running in 
>Java 8 SE.
>
>Gary Greenberg
>Staff Software Engineer
>

Reply via email to