“这台服务器上的回复是中文的,不是Base64的。”
如果 "H4slAAAAAAAEAKtWSs5PSVWysrTUUcotTIeyUvL3VqoFALdFALdGW0kWAAAAAA==" 是回复,
它不是中国人。 看人物; 他们不是汉字。 它们是拉丁/ASCII字符。
如果我假设 Base64 并解码为中文,我会看到一些中文字符,但有几个不同的
中文字符集。
“我试过 GetString2,但没有用;”
您使用了哪种编码? 你说的是哪个汉字集?
“我为同一个WEBAPI部署了2台服务器,一台返回正常,另一台出现乱码;
不知道是不是WEBAPI的问题?”
如果您向 2 个不同的服务器提出相同的问题并且收到 2 个不同的答案(其中 1 个是正确的),
我会怀疑我使用多年的其他服务器,而不是 okhttp。
另外,webapi 不是 okhttputils。 这是一个不同的api。 我不熟悉它。 对不起
“Zhè tái fúwùqì shàng de huífù shì zhōngwén de, bùshì Base64 de.”
Rúguǒ"H4slAAAAAAAEAKtWSs5PSVWysrTUUcotTIeyUvL3VqoFALdFALdGW0kWAAAAAA==" shì huífù,
tā bùshì zhōngguó rén. Kàn rénwù; tāmen bùshì hànzì. Tāmen shì lādīng/ASCII zìfú.
Rúguǒ wǒ jiǎshè Base64 bìng jiěmǎ wéi zhōngwén, wǒ huì kàn dào yīxiē zhōngwén zìfú, dàn yǒu jǐ gè bùtóng de
zhōngwén zìfú jí.
“Wǒ shìguò GetString2, dàn méiyǒu yòng;”
nín shǐyòngle nǎ zhǒng biānmǎ? Nǐ shuō de shì nǎge hànzì jí?
“Wǒ wèi tóng yīgè WEBAPI bùshǔle 2 tái fúwùqì, yī tái fǎnhuí zhèngcháng, lìng yī tái chūxiàn luànmǎ;
bù zhīdào shì bùshì WEBAPI de wèntí?”
Rúguǒ nín xiàng 2 gè bùtóng de fúwùqì tíchū xiāngtóng de wèntí bìngqiě shōu dào 2 gè bùtóng de dá'àn (qízhōng 1 gè shì zhèngquè de),
wǒ huì huáiyí wǒ shǐyòng duōnián de qítā fúwùqì, ér bùshì okhttp.
Lìngwài,webapi bùshì okhttputils. Zhè shì yīgè bùtóng de api. Wǒ bù shúxī tā. Duìbùqǐ
----------------------------------------------------------------------------------------------------------------------
"The reply on this server is Chinese, not Base64."
if "H4slAAAAAAAEAKtWSs5PSVWysrTUUcotTIeyUvL3VqoFALdFALdGW0kWAAAAAA==" is the reply,
it is not chinese. look at the characters; they are not chinese characters. they are latin/ascii characters.
if I assume Base64 and decode to chinese, i see some chinese characters, but there several different
chinese character sets.
"I tried GetString2, but it didn't work;"
which encoding did you use? which chinese character set are you talking about?
"I deployed 2 servers for the same WEBAPI, one returned normal and the other was garbled;
I don't know if it is a WEBAPI problem?"
if you ask the same question to 2 different servers and you receive 2 different answers (and 1 is correct),
I would suspect the other server, not okhttp, which i have used for many years.
also,webapi is not okhttputils. it is a different api. i am not familiar with it. sorry