如何通过 Bugzilla REST API 发布带有 Unicode 文本的错误
我在发布 Unicode 文本错误时遇到了问题。
我在 .NET 中的代码看起来像。
HttpWebRequest request = BugzillaService.MakeRequest(url, "POST");
request.ContentType = "application/json;charset=utf-8";
byte[] bytes = Encoding.UTF8.GetBytes(data);
request.ContentLength = bytes.Length;
using (Stream requestStream = request.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
该代码适用于 ASCII 文本。
Bugzilla 网站已启用 Unicode,我可以通过网站发布带有 Unicode 文本的错误。但 Bugzilla REST 服务失败。
我是否错过了必须在 Bugzilla 网站或 REST 服务中配置某些内容才能支持 Unicode 文本?
提前致谢。
I've got a problem when posting a bug with Unicode text.
My code in .NET looks like.
HttpWebRequest request = BugzillaService.MakeRequest(url, "POST");
request.ContentType = "application/json;charset=utf-8";
byte[] bytes = Encoding.UTF8.GetBytes(data);
request.ContentLength = bytes.Length;
using (Stream requestStream = request.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
The code works well with ASCII text.
Unicode has been turn on with Bugzilla website, I could post a bug with Unicode text via website. But failed with Bugzilla REST service.
Do I miss something must be configured in Bugzilla website or REST service to support Unicode text?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否安装了此补丁?
Have you installed this patch?