static private bool FileNameIsUtf8(char[] FileNameChars)
{
bool isUTF8 = false;
bool isUnicode = false;
for (int j = 0; j < FileNameChars.Length; j++)
{
byte[] b = System.BitConverter.GetBytes(FileNameChars[j]);
isUnicode |= (b.Length != 2);
isUnicode |= (b[1] != 0);
isUTF8 |= ((b[0] & 0x80) != 0);
}
return isUTF8;
}
#endif