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

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

@KedemBarak

Description

@KedemBarak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions