read text file to a string. This function will first detect encoding and can handle unicode text
BOOL ocu_read_text_file( LPCSTR lpcszFilename, string * pstr, BOOL bGuessEncoding = TRUE )
FALSE if file not found
EX1
#include <ocu.h> void bb(string strFile="origin.ini") { string strPath = GetOriginPath() + strFile; string str; if(ocu_read_text_file(strPath, &str)) out_str(str); }
ocu.h