473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Strange encoding behaviour

Good Morning,
I've the following problem :

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

I've putted this page on my site at the url
http://www.etantonio.it/EN/Economia/indexTest.aspx

////////////////////////////////////////////////////////
<html>
<title>Economy</title>
</head>
<body>
<p align="center">Economy</p>
</body>
</html>
////////////////////////////////////////////////////////

If I try to translate this using altavista, the result is directly
available at
the url http://babelfish.altavista.com/babel...indexTest.aspx
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"
ResponseEncoding="utf-8"%>
<%@ import Namespace="System" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="System.Net" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E )
{
String sAddress =
"http://babelfish.altavista.com/babelfish/trurl_pagecontent?doit=done&tt=url&intl=1&lp=en_fr &url=http%3A%2F%2Fwww.etantonio.it%2Fen%2Feconomia %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);
}
</script>
///////////////////////////////////////////////////////////////////////////////
whose result is available at the url

http://www.etantonio.it/Utility/Trad...FrRidotto.aspx

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 =
"http://www.etantonio.it/Utility/Traduzioni/FR.aspx" ;
Can you help me ???
Many thanks in any case ...

Engineer Antonio D'Ottavio
www.etantonio.it/en
po********@etantonio.it
Jul 21 '05 #1
0 976

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Sebastian Meyer | last post by:
Hi newsgroup, i am trying to replace german special characters in strings like str = re.sub('ö', 'oe', str) When i work with this, i always get the message UniCode Error: ASCII decoding error...
2
by: Juho Vuori | last post by:
Hello, I'm wondering about the following behaviour of str() with strings containing non-ASCII characters: str(u'foo') returns 'foo' as expected. str('lää') returns 'lää' as expected. ...
10
by: Oscar Thornell | last post by:
Hi, I generate and temporary saves a text file to disk. Later I upload this file to Microsoft MapPoint (not so important). The file needs to be in UTF-8 encoding and I explicitly use the...
4
by: liam_weston | last post by:
I have 2 supposedly identical Windows 2000 web servers each with IIS5. Both have the ASPCODEPAGE set to 65001 (utf-8) in the metabase. The first server has been running pages like the one below...
5
by: ioni | last post by:
Good day, fellows! I have a strange problem – at my site there is a flash strip, that loads data dynamically. It works fine (grabs data from the remote server and presents it), however in IE7...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.