可以注意到 ,_strnicmp 在linux 中对应 strncasecmp,而 _wcsnicmp 在linux中我没有找到相应功能函数。对于打开文件操作,如果文件名是以 UNICODE 格式存储的,在 MSVC2005之前使用 _tfopen 这个宏,在MSVC 2005 出现之后,你可以在第二个参数中使用 “ccs:UNICODE”来指定,如。FILE *fp = fopen(FILENAME, "rb,ccs=UNICODE");linux可能早已支持这种参数形式,可以参考linux man:fopen(3).如果没有指定ccs,linux将以你使用的第一个文件操作函数是 UNICODE的还是 非UNICODE 的来决定。(,ccs=string
The given string is taken as the name of a coded character set and the stream is marked as wide-oriented. Thereafter, internal conversion functionsconvert I/O to and from the character setstring. If the ,ccs=string syntax is not specified, then the wide-orientation of the stream isdetermined by the first file operation. If that operation is a wide-character operation, the stream is marked wide-oriented, and functions to convert to thecoded character set are loaded. )