email link and foreign accent

V

Vittorio

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
 
P

Peter Hansen

Vittorio said:
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
 
V

Vittorio

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\[email protected]'

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
 
V

Vittorio

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

'carr\[email protected]'

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top