如题,
请教怎么用CFile创建一个文本文件的时候将它保存的格式存为unicode呢?(代码实现)

解决方案 »

  1.   

    要保存 Unicode,
    和这个 cfile 是没有什么关系的,
    只要你写入文件的 cstring 是 Unicode 的,
    文件自然就是 Unicode 的 ...只有怎么操作 CString 为Unicode的,
    请看 _T 宏 和 L"" 方式宽字符串...
      

  2.   

    CString strSports(L"Hockey is Best!");就表示这个串是Unicode格式的。
      

  3.   

    给你提供很好的宏吧
    #include <atlbase.h>USE_CONVERSION;
    LPWSTR wstr = A2W(astr);
      

  4.   

    storing a FE FF at the beginning of every Unicode file; this is called a Unicode Byte.