VALID_FILENAME_CHAR should not be determined at compile-time on Windows
On Windows, VALID_FILENAME_CHAR depends on the system encoding. On a Western Windows, the expression is
#define VALID_FILENAME_CHAR ((ch >= 32) && (ch <= 61) && \
(ch != 34) && (ch != 42) && (ch != 47) && (ch != 58) && \
(ch != 60)) || ((ch >= 64) && (ch != 92) && (ch != 124))
but on a different Windows installation, the expression is
#define VALID_FILENAME_CHAR ((ch >= 32) && (ch <= 61) && \
(ch != 34) && (ch != 42) && (ch != 47) && (ch != 58) && \
(ch != 60)) || ((ch >= 64) && (ch <= 132) && (ch != 92) && \
(ch != 124) && (ch != 130)) || ((ch >= 137) && (ch <= 234) && \
(ch != 152)) || ((ch >= 240) && (ch != 252))
When a Windows binary is build on the second system and run on the first one, it rejects file names that contain the byte 0xFC.
Reported by Ulrike Fischer in https://www.tug.org/pipermail/tex-live/2018-September/042369.html .