SetUniCodeType
set UniCode file type if the file doesn't exist bom.
BOOL SetUniCodeType( int nUniCodeType )
if nUniCodeType is valid, return TRUE, otherwise, will return FALSE.
UNICODE_NON is invalid Unicode type.
EX1
void stdioFile_SetUniCodeType_ex1() { string strFilename = "C:\\test.txt"; stdioFile ff; bool bRet = ff.Open(strFilename, file::modeRead); if(!bRet) { out_str("file not found!"); return; } if(ff.CheckUniCodeBOM() == 0) { bool bRet = ff.SetUniCodeType(0x5000); //assume file UniCode type is UINICODE8 if(!bRet) return; } ff.Close(); }
origin.h