HTTP iterface和“&”在字符串中 [英] HTTP iterface and "&" in string
问题描述
我正在使用带MS接口的MS转换器,效果很好。有时,我要翻译的文字包含"&"字符,可能导致字符串在此处终止,而不是整个字符串被翻译。
Hi, I'm using MS translator with HTTP interface and it works great. Sometimes my text to translate contains "&" character, which probably causes string termination at this place and not whole string is translated.
Do 必须用某些东西替换这个角色(或其他一些角色)或者我应该如何转换这些文字?
Do have to replace this character (or some others as well) with something or how should I translete such text?
谢谢
Jozef
推荐答案
这是正确的,'&'是http查询中的保留字符。在发送之前,您需要对字符串进行URLEncode编码。 URLEncoded相当于'&'是'%26'。
That's correct, '&' is a reserved character in http queries. You'll need to URLEncode the string before sending it. The URLEncoded equivalent of '&' is '%26'.
Chris Wendt
Microsoft Translator
Chris Wendt
Microsoft Translator
这篇关于HTTP iterface和“&”在字符串中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!