中文编码GB2312如何转化 比如:%D6%D0%CE%C4=中文

"%D6%D0%CE%C4" 应该是 "中文"的GB2312 编码,但是我获取的是"%D6%D0%CE%C4" ,怎么把他转成"中文"两个字呢?
分数不多,多谢帮忙!
[89 byte] By [chiyan-迟言] at [2008-6-5]
# 1
我顶顶顶
chiyan-迟言 at 2007-10-20 > top of Msdn China Tech,Delphi,语言基础/算法/系统设计...
# 2
%D6%D0%CE%C4
把%改为$
Chr($D6)+Chr($D0)...
就是了
代码类似
Chr(InttoStr('$D6'))...
具体自己弄~
# 3
var
mStr: string;
begin
mStr := #$D6#$D0#$CE#$C4;
showmessage(mStr);
end;
erhan-二憨 at 2007-10-20 > top of Msdn China Tech,Delphi,语言基础/算法/系统设计...
# 4
我试试,谢谢
chiyan-迟言 at 2007-10-20 > top of Msdn China Tech,Delphi,语言基础/算法/系统设计...
# 5
可以考虑使用一下Indy Misc组件面板中的TIdQuotedPrintableDecoder控件,代码如下:
var
Str: String;
begin
Str := '%D6%D0%CE%C4';
Str := StringReplace(Str, '%', '=', [rfReplaceAll]);//转换成=D6=D0=CE=C4格式
IdQuotedPrintableDecoder1.CodeString(Str);
Str := IdQuotedPrintableDecoder1.CompletedInput;
Delete(Str, 1, 2);//去掉前两个字符
ShowMessage(Str);
end;
# 6
to:DunDao(Foolish)
没有这个TIdQuotedPrintableDecoder吧
只有TIdPrintableDecoderQuoted,但是用上去也不行啊
chiyan-迟言 at 2007-10-20 > top of Msdn China Tech,Delphi,语言基础/算法/系统设计...
# 7
to:erhan(二憨)
具体点可以吗
chiyan-迟言 at 2007-10-20 > top of Msdn China Tech,Delphi,语言基础/算法/系统设计...
# 8
你用的是delphi几,D6肯定是没问题的。
# 9
7.0的谢谢
chiyan-迟言 at 2007-10-20 > top of Msdn China Tech,Delphi,语言基础/算法/系统设计...
# 10
D7用这个TIdDecoderQuotedPrintable

var
Str: String;
begin
Str := '%D6%D0%CE%C4';
Str := StringReplace(Str, '%', '=', [rfReplaceAll]);
Str := IdDecoderQuotedPrintable1.DecodeString(Str);
ShowMessage(Str);
end;