Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Issue with accent Letters in Spanish with BufferedWriter & CsvWriter #5

Open
KedemBarak opened this issue Sep 12, 2017 · 1 comment

Comments

@KedemBarak
Copy link

KedemBarak commented Sep 12, 2017

Facing an issue with accent Letters in Spanish with BufferedWriter & CsvWriter:
for some reason when I try to write some letters they are being changed for unclear reason
this string:
SİSTA+UNİVERSAL+SİLİKON+&pace&ar

converted into:
SÄ°STA+UNÄ°VERSAL+SÄ°LÄ°KON+&pace&ar
I believe That is not the expected behavior.

The İ is converted into Ä°

As you can see I set the encoding in the example.

public static void main(String[] args) throws IOException {
	Writer writer = new FileWriterWithEncoding("c:/temp/xzyz.csv", "UTF8");
	String arr[] = {"SİSTA+UNİVERSAL+SİLİKON+&pace&ar"};
	BufferedWriter bufferedWriter = new BufferedWriter(writer);
	CSVWriter csvWriter = new CSVWriter(bufferedWriter);
	csvWriter.writeNext(arr);
	csvWriter.close();
}

I used Office Excell to open the generated file.

This is the result
https://imgur.com/3w1wbR8

@tejavenkatlanka
Copy link

"SİSTA+UNİVERSAL+SİLİKON+&pace&ar" it is perfect out put is went wrong with Office excell

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants