中文编码GB2312如何转化 比如:%D6%D0%CE%C4=中文 "%D6%D0%CE%C4" 应该是 "中文"的GB2312 编码,但是我获取的是"%D6%D0%CE%C4" ,怎么把他转成"中文"两个字呢?分数不多,多谢帮忙! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 %D6%D0%CE%C4把%改为$Chr($D6)+Chr($D0)...就是了代码类似Chr(InttoStr('$D6'))...具体自己弄~ var mStr: string;begin mStr := #$D6#$D0#$CE#$C4; showmessage(mStr);end; 可以考虑使用一下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; to:DunDao(Foolish)没有这个TIdQuotedPrintableDecoder吧只有TIdPrintableDecoderQuoted,但是用上去也不行啊 to:erhan(二憨) 具体点可以吗 你用的是delphi几,D6肯定是没问题的。 D7用这个TIdDecoderQuotedPrintablevar Str: String;begin Str := '%D6%D0%CE%C4'; Str := StringReplace(Str, '%', '=', [rfReplaceAll]); Str := IdDecoderQuotedPrintable1.DecodeString(Str); ShowMessage(Str);end; 怎样在sql server中存储JPG格式的图片和读取此格式图片 关于edit和数据库 **再次请问:取得一列中的最大值** 请问Memo的容量?分不够再加 什么防火墙比较好???? 24个不同数据库进行数据采集然后插入到一个中心数据库中的问题。 dbgrid追加空行 我想做一个局域网聊天程序,想请教几个问题?上次我发了好多分给大家,大家可不能白拿分了。 请诊断一断代码 哪有ado方面的电子书籍下载? listview 组合 问题 delphi activeX 参数
把%改为$
Chr($D6)+Chr($D0)...
就是了
代码类似
Chr(InttoStr('$D6'))...
具体自己弄~
mStr: string;
begin
mStr := #$D6#$D0#$CE#$C4;
showmessage(mStr);
end;
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;
没有这个TIdQuotedPrintableDecoder吧
只有TIdPrintableDecoderQuoted,但是用上去也不行啊
具体点可以吗
Str: String;
begin
Str := '%D6%D0%CE%C4';
Str := StringReplace(Str, '%', '=', [rfReplaceAll]);
Str := IdDecoderQuotedPrintable1.DecodeString(Str);
ShowMessage(Str);
end;