XE2 using two methods: can be encoded Encodestring and IdencoderMIME Encodestring
I want to achieve with the interface to upload an XML:
<? The XML version="1.0" encoding="GBK"?>
110101000000001 & lt;/Code>
Address & lt; Account>
Telephone & lt; Phone>
17 & lt;/Rate>
Note & lt;/Notes>
Use EncodeString coding, to get:
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iR0JLIj8 + DQogPGRhdGE + DQogICAgICA8SW5m
B0tpbmQ + MDwvSW5mb0tpbmQ + CQ0KICAgICAgPE5hbWU + suLK1DwvTmFtZT4JDQogICAgICA8Q29k
ZT4xMTAxMDEwMDAwMDAwMDE8L0NvZGU + CQ0KICAgICAgPEFjY291bnQ + tdjWtzxBY2NvdW50PgkN
CiAgICAgIDxQaG9uZT6157uwPFBob25lPgkNCiAgICAgIDxSYXRlPjE3PC9SYXRlPgkNCiAgICAg
IDxOb3Rlcz6xuNeiPC9Ob3Rlcz4NCiA8L2RhdGE + DQo=
Use IdencoderMIME encodestring coding, get:
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iR0JLIj8 + DQogPGRhdGE + DQogICAgICA8SW5mb0tpbmQ + MDwvSW5mb0tpbmQ + CQ0KICAgICAgPE5hbWU + Pz88L05hbWU + CQ0KICAgICAgPENvZGU + MTEwMTAxMDAwMDAwMDAxPC9Db2RlPgkNCiAgICAgIDxBY2NvdW50Pj8/PEFjY291bnQ + CQ0KICAgICAgPFBob25lPj8/PFBob25lPgkNCiAgICAgIDxSYXRlPjE3PC9SYXRlPgkNCiAgICAgIDxOb3Rlcz4/PzwvTm90ZXM + DQogPC9kYXRhPg==
Server after receiving, decoding:
1. Use EncodeString
<? The XML version="1.0" encoding="GBK"?>
?? e a ? ? 鍿 隵 e a ? ? 鍿 FS? S Michael & amp; FS he filial piety f & lt; Notes> Note & lt;/Notes>
2. Use IdencoderMIME. Encodestring
<? The XML version="1.0" encoding="GBK"?>
110101000000001 & lt;/Code>
??
??
17 & lt;/Rate>
??
A Chinese garbled, a Chinese character into???
I want to ask next to complete the decoding Chinese characters out, what should I write?
Encodestring and IdencoderMIME Encodestring difference?
The former 76 characters will automatically wrap, the latter why not change?
CodePudding user response:
Have a great god help me to seeCodePudding user response:
With q, help top, purple potato patch