2

We have a CentOS backend running server software that is processing files generated by our clients. Many of our clients are Windows users, and generate these files on their Windows machines in the CP-1252 (aka "Win-1252") character encoding.

Occasionally, when processing these files, we get one that has a CP-1252 character in the file name, and this causing our server code to choke (and throw runtime exceptions). We could implement a code solution where we read files (and their names) in as pure binary and then apply the correct character encoding to them, however if there is an easier (systems-level) fix that doesn't involve coding effort and a new release, that would be optimal.

So I ask: is it possible to add CP-1252 support for CentOS machines? Thanks in advance!

zharvey
  • 195

2 Answers2

2

This is generally something you will have to manage in your software. Filenames in Unix are already treated as binary; as jordanm mentioned earlier, only '/' and '\0' are disallowed characters. See the answers to this question for more info: Several questions about file-system character encoding on linux

Jim Paris
  • 14,337
1

Did adding the following to your environment for your Java backend have any effect on the problem you reported in How to add cp 1252 to centos on Superuser:

export LC_ALL="en_US.ISO-8859-1"
HeatfanJohn
  • 1,305