thanks

解决方案 »

  1.   

    可以去访问注册表
    [HKEY_CLASSES_ROOT\MIME\Database\Codepage]
    下的每个节点的Description的值
      

  2.   

    谢谢,楼上。
    不过好像注册表中的CODEPAGE比IE中的编码来的多很多啊?
    比如日文,好像有5种。晕。
      

  3.   

    我已经知道怎么弄了。thanks!
      

  4.   


    function GetCPInfoEx(CodePage: UINT;dwFlags: LongWord; var lpCPInfo: TCPInfoEx): BOOL; stdcall; external kernel32 name 'GetCPInfoExA';function EnumLocalesProc(
      lpLocaleString: PAnsiChar
    ): Boolean;stdcall;
    var
      CodePage: LongWord;  LocaleName: array[0..MAX_PATH] of char;
      str: String;
      lcp:TCPINFOEX;
    begin
      str := strpas(lpLocaleString);
      CodePage := StrToInt( str);
      GetCPInfoEx(CodePage,0,lcp);
      //WriteLogThreadsafe('c:\Locals.txt',String(lcp.CodePageName)+#13#10);
      ShowMessage(lcp.CodePageName);
      Result := true;end;
    EnumSystemCodePages(@EnumLocalesProc,CP_SUPPORTED);
      

  5.   

    用 GetOEMCP() 获取当前系统支持的非Unicode程序的语种。
      

  6.   

    用 GetOEMCP() 获取当前系统支持的非Unicode程序的字符编码。
      

  7.   

    报错:Undeclared identifier: 'TCPInfoEx'
      

  8.   

    抱歉,忘了
    Type
      _cpinfoexA = record
        MaxCharSize: LongWord;
        DefaultChar: Array[0..MAX_DEFAULTCHAR-1] of Byte;
        LeadByte: Array[0..MAX_LEADBYTES-1] of Byte;
        UnicodeDefaultChar: WideChar;
        CodePage: LongWord;  
        CodePageName: Array[0..MAX_PATH-1] of AnsiChar;
      end;
      CPINFOEXA = _cpinfoexA;
      LPCPINFOEXA = ^CPINFOEXA;  _cpinfoexW = record
        MaxCharSize: LongWord;
        DefaultChar: Array[0..MAX_DEFAULTCHAR-1] of Byte;
        LeadByte: Array[0..MAX_LEADBYTES-1] of Byte;
        UnicodeDefaultChar: WideChar;
        CodePage: LongWord;  
        CodePageName: Array[0..MAX_PATH-1] of WideChar;
      end;
      CPINFOEXW = _cpinfoexW;
      LPCPINFOEXW = ^CPINFOEXW;  CPINFOEX = CPINFOEXA;
      LPCPINFOEX = ^CPINFOEX;
      

  9.   

    谢谢,Delphi太强了。明天结贴。来者犹分。
      

  10.   

    EnumLocalesProc 这个怎么调用?能否详细解释一下,谢谢。
      

  11.   

    EnumSystemCodePages(@EnumLocalesProc,CP_SUPPORTED);
      

  12.   

    当前设定的语言,windows.GetACP