Strange encoding behaviour

Discussion in 'ASP .Net' started by Antonio, Dec 29, 2004.

  1. Antonio

    Antonio Guest

    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/babe...//www.etantonio.it/en/economia/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/Traduzioni/TraduttoreAltavistaPaginaWebEnFrRidotto.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
     
    Antonio, Dec 29, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Antonio

    Strange encoding behaviour

    Antonio, Dec 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    433
    Antonio
    Dec 29, 2004
  2. Hardy Wang

    Encoding.Default and Encoding.UTF8

    Hardy Wang, Jun 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    18,940
    Jon Skeet [C# MVP]
    Jun 9, 2004
  3. Antonio

    Strange encoding behaviour

    Antonio, Dec 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    330
    Antonio
    Dec 29, 2004
  4. Andy Chambers
    Replies:
    1
    Views:
    395
    Daniel Dyer
    May 14, 2007
  5. Replies:
    4
    Views:
    177
Loading...

Share This Page