unicheck.h

来自「WinMerge可以显示两个文件的不同之处」· C头文件 代码 · 共 26 行

H
26
字号
#ifndef unicheck_h_included
#define unicheck_h_included

/**
 * @brief Information about whether a file is in a Unicode encoding
 */
struct unicodingInfo
{
	typedef enum { 
		UNICODE_NONE,
		UNICODE_UTF8,     // UTF-8
		UNICODE_UCS2LE,   // UCS-2LE or UTF-16LE
		UNICODE_UCS2BE,   // UCS-2BE or UTF-16BE
		UNICODE_UTF32LE,  // UTF-32LE
		UNICODE_UTF32BE   // UTF-32BE
	} UNICODE_TYPE;
	UNICODE_TYPE type;
	int bom_width; // in bytes
	int char_width; // in bytes (1 for NONE or UTF-8)
	int low_byte; // offset in bytes
};

bool CheckForBom(char * buffer, int len, unicodingInfo * uinfo);

#endif // unicheck_h_included

⌨️ 快捷键说明

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