Search code examples
linuxencodingjava-8jbosswildfly

CSV Export Encoding miss-match on Local and QA


There is the same source code (Java 8) deployed (WildFly) on the local environment and QA environment. But in the local environment exported CSV file has ANSI encoding while the QA environment having the UTF-8 encoding. Because of this, the QA environment exported files are giving some weird characters for the Swedish Language. Does anyone know about the reason for this encoding miss-match?


Solution

  • Found the problem with this. It was an environmental problem. My local Wildfly was running on windows OS while the other(QA, UAT, Live) servers were running on a Linux OS. The solution was to set the encoding type to UTF-8 BOM forcibly when it is needed, where the UTF-8 BOM encoding is working on Windows OS and Linux OS correctly for (Swedish) special characters in exported CSV files. It solved the problem.