WEB SERVICE.NET,使用UTF-8编码解析数据时出错 [英] WEB SERVICE.NET, Error parsing data with Encoding UTF-8

查看:58
本文介绍了WEB SERVICE.NET,使用UTF-8编码解析数据时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我对Web服务有疑问

现在,我有一个用.Net开发的Web服务.
我的客户在Delphi中有一个System Develop....问题是这个.

当客户向我发送带有ñ"或´"或任何特殊字符的数据时,它将转换为"??".

我在Google中搜索有关编码的信息,并在Web.config中进行了更改
但问题仍然存在.

这是我在Web配置中所做的更改...

Hi.
i have a problem with a Web Service

Right now, i have a Web Service developed in .Net.
And my client has a System Develop in Delphi.... the problem is this.

when the client send me a Data with "ñ" or "´" or any special character this convert into a "??".

I Search in google, about encoding and i made changes in my Web.config
but problem still.

here are the changes that i made in my web config...

<?xml version="1.0" encoding="utf-8"?>


还有这个


and this one too

<system.web>
  <globalization enableClientBasedCulture="false" requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8"
    responseHeaderEncoding="utf-8"  enableBestFitResponseEncoding="true" culture="es-MX" uiCulture="es-MX"/>



并且不起作用.

所有这些都在墨西哥
我的服务器是Windows Server 2003
区域设置英文(已安装60001 UTF-8)

有办法解决这个问题吗?或我怎么知道问题出在客户端还是我端.
在此先感谢



and is not working.

all of this is in mexico
my server is Windows server 2003
Regional Settings English (installed 60001 UTF-8)

There''s a way to fix this? or how can i know if the problem is in the client side or my side.
Thanks in advance

推荐答案

下午好,
几天后,便能够找到错误.
错误不在我的Web服务中,而是在客户的应用程序中.
检查我的web.config,一切都完美.当我生成测试数据传递时..所有测试均成功..但是当客户端发送相同的数据时,将显示错误.
更正为:
在客户端项目中.从"ISO-XXXXX"更改为"UTF-8"
并且问题已解决.
另一种情况是..问题出在两个客户端上.作为Web服务.
建议始终处理编码:UTF-8
问候和下午好
Good afternoon,
after a few days, which was able to find the error.
the error was not in my web service, was in the customer''s application.
check my web.config and everything perfect. when I generate test data delivery .. all tests were successful .. but when the client sent the same data, the error is displayed.
The correction was:
In the client project. changed to "ISO-XXXXX" to "UTF-8"
and problem was fixed.
Another case is the other way around .. the problem is of the two, both client. as the web service.
As a recommendation, always handle encoding: UTF-8
Greetings and Excellent afternoon


这篇关于WEB SERVICE.NET,使用UTF-8编码解析数据时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆