⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cstdiofile_utf8.h

📁 存UTF8格式文件
💻 H
字号:
#pragma once
#if !defined(CSTDIOFILE_UTF8_INC_)
#define CSTDIOFILE_UTF8_INC_

/**
 * This class adapts the CStdioFile MFC class to read and write to UTF8 
 * encoded files. If the application is compiled with unicode support, all
 * UTF8 character sequences are handled, else only the normal ASCII7 subset.
 */
class CStdioFile_UTF8 : public CStdioFile
{
public:
	// Duplicate the standard constructors
	CStdioFile_UTF8() : CStdioFile() {}
	CStdioFile_UTF8(FILE* pOpenStream) : CStdioFile(pOpenStream) {}
	CStdioFile(LPCTSTR lpszFileName, UINT nOpenFlags) : CStdioFile(lpszFileName, nOpenFlags) {}

    // Override these methods for UTF8 conversion
	virtual LPTSTR ReadString(LPTSTR lpsz, UINT nMax);
	virtual BOOL ReadString(CString& rString);
	virtual void WriteString(LPCTSTR lpsz);

    // Read and write an optional Byte Order Mark
	BOOL ReadBOM();
	void WriteBOM();
}

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -