Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Strange encoding behaviour

Thread Tools

Strange encoding behaviour

Posts: n/a
Good Morning,
I've the following problem :

I want to translate some page of my site using babelfish translator of
To avoid manual job I want to deliver a c# script that produce this

I've putted this page on my site at the url

<p align="center">Economy</p>

If I try to translate this using altavista, the result is directly
available at
the url
and it's working OK, the translation of Economy in French is …conomie
, the problem is in the first letter of …conomie
, the … is not well recognized instead by the following my c# script

<%@ Page Language="c#" debug="true" trace="true"
<%@ import Namespace="System" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="System.Net" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E )
String sAddress =
" & %2FindexTest.aspx"
WebRequest req = WebRequest.Create(sAddress);
WebResponse result = req.GetResponse();
Stream ReceiveStream = result.GetResponseStream();
StreamReader reader = new StreamReader(ReceiveStream, Encoding.UTF8
String sHtmlTradotto = reader.ReadToEnd();
Trace.Write("sHtmlTradotto", sHtmlTradotto);

whose result is available at the url

and basically shows that the … of …conomie is blanked.

How can I solve the problem and finally obtain this translation ??

I think the problem is not in the code because if I use it for this
other address string

String sAddress =
"" ;

Can you help me ???
Many thanks in any case ...

Engineer Antonio D'Ottavio Removed)
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
debugger behaviour different to execution behaviour Andy Chambers Java 1 05-14-2007 09:51 AM
Strange behaviour with UTF-8 encoding ASP General 4 02-13-2006 11:19 AM
Strange encoding behaviour Antonio ASP .Net 0 12-29-2004 02:48 PM
Strange encoding behaviour Antonio ASP .Net 0 12-29-2004 02:45 PM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM