email link and foreign accent

Discussion in 'Python' started by Vittorio, Jul 2, 2005.

  1. Vittorio

    Vittorio Guest

    Hi,

    I have one problem ( I am a python beginner) in a cgi:

    print"""<a href="mailto:%s">""" %(campovalore.encode('iso-8859-1'))
    print campovalore.encode('iso-8859-1')
    print """</a>"""


    campovalore is an email address with special (italian) characters.

    From IE6 everything is fine and the link launches my predefined (in
    Windows) email client with the correct string in the mailto field.

    But from Firefox and the same email client I have an incorrect mailto field
    every time there is a special character in the string.

    Any suggestion is welcome,

    vittorio
     
    Vittorio, Jul 2, 2005
    #1
    1. Advertising

  2. Vittorio

    Peter Hansen Guest

    Vittorio wrote:
    > print"""<a href="mailto:%s">""" %(campovalore.encode('iso-8859-1'))
    > print campovalore.encode('iso-8859-1')
    > print """</a>"""
    >
    > campovalore is an email address with special (italian) characters.
    > [snip]
    > Any suggestion is welcome,


    It might help if you showed us the output of "repr(x)" where x is the
    output of the campovalore.encode('iso-8859-1') part above.

    -Peter
     
    Peter Hansen, Jul 2, 2005
    #2
    1. Advertising

  3. Vittorio

    Vittorio Guest

    Peter Hansen <> wrote in news:6f-dnTSTQazBSlvfRVn-
    :

    > Vittorio wrote:
    >> print"""<a href="mailto:%s">""" %(campovalore.encode('iso-8859-1'))
    >> print campovalore.encode('iso-8859-1')
    >> print """</a>"""
    >>

    > It might help if you showed us the output of "repr(x)" where x is the
    > output of the campovalore.encode('iso-8859-1') part above.


    Thanks Peter for replying.
    This is an example of the output of repr(x) as you requested:

    'carr\'

    Results:
    link opened from IE6->Outlook: it works
    link opened from IE6->Pocomail: it works
    link opened from Firefox->Outlook: characters with accent fail
    link opened from Firefox->Pocomail: characters with accent fail

    It looks like having to do more with Firefox than with Python itself but
    maybe someone can help anyway?

    vittorio
     
    Vittorio, Jul 4, 2005
    #3
  4. Vittorio

    Vittorio Guest

    Vittorio <> wrote in news:Xns96896D46D9DCCSoToSpeak@
    195.110.128.18:

    > Thanks Peter for replying.
    > This is an example of the output of repr(x) as you requested:
    >
    > 'carr\'
    >
    > Results:
    > link opened from IE6->Outlook: it works
    > link opened from IE6->Pocomail: it works
    > link opened from Firefox->Outlook: characters with accent fail
    > link opened from Firefox->Pocomail: characters with accent fail


    adjournment:

    link opened from Firefox->Thunderbird:it works
    link opened from IE6->Thunderbird:it works
     
    Vittorio, Jul 4, 2005
    #4
    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. Stan Sainte-Rose

    StreamReader and Accent

    Stan Sainte-Rose, May 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    814
    Joerg Jooss
    May 20, 2004
  2. Fabrice
    Replies:
    0
    Views:
    455
    Fabrice
    Jan 21, 2006
  3. franz

    accent and Request.Form

    franz, Mar 2, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    463
    Joerg Jooss
    Mar 4, 2006
  4. H5N1
    Replies:
    0
    Views:
    446
  5. Sean

    TextBox and Grave Accent

    Sean, Dec 14, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    215
Loading...

Share This Page