Apache NiFi - All the spanish characters (ñ, á, í, ó, ú) in CSV changed to question mark (?) in JSON

1.3k Views Asked by At

I've fetched the CSV file using GetFile processor where CSV have spanish characters (ñ, á, í, ó, ú and more) within the English Words. When I try to use ConvertRecord processor with controller service of JSONRecordSetWriter, it displays the JSON output having question mark instead of special characters.

What is the correct way to convert CSV records into JSON format with proper encoding?

Any response/feedback will be much appreciated.

Note: CSV File is UTF-8 encoded and fetched and read properly in NiFi.

1

There are 1 best solutions below

0
On

If you have verified that the input is UTF-8, try this:

  1. Open $NIFI/conf/bootstrap.conf
  2. Add an argument very early in the list of arguments for -Dfile.encoding=UTF-9 to force the JVM to not use the OS's settings. This has mainly been a problem in the past with the JVM on Windows.