bool Toolkit::LoadFile( const std::string &filename ) { if ( IsUTF16( filename ) ) { return LoadUTF16File( filename ); } std::ifstream in( filename.c_str() ); if (!in.is_open()) { return false; } in.seekg(0, std::ios::end); std::streamsize fileSize = (std::streamsize)in.tellg(); in.clear(); in.seekg(0, std::ios::beg); // read the file into the string: std::string content( fileSize, 0 ); in.read(&content[0], fileSize); return LoadString( content ); }
inline bool IsFixedSingleCharCodePage(UINT CP) {return (!IsUTF7(CP) && !IsUTF8(CP) && !IsUTF16(CP) && !IsUTF32(CP) ); };