473,396 Members | 1,998 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,396 software developers and data experts.

email link and foreign accent

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
Jul 19 '05 #1
3 2628
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
Jul 19 '05 #2
Peter Hansen <pe***@engcorp.com> wrote in news:6f-dnTSTQazBSlvfRVn-
jQ@powergate.ca:
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\xe*@pluto.it'

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
Jul 21 '05 #3
Vittorio <re*******@libero.it> 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\xe*@pluto.it'

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
Jul 21 '05 #4

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

Similar topics

2
by: JB | last post by:
Hi, I'm having a problem with accent in PHP/HTML. I have a value stored in a table. The value is : é è à ù When I look directly into table via phpmyadmin, the value seems to be stored...
114
by: muldoon | last post by:
Americans consider having a "British accent" a sign of sophistication and high intelligence. Many companies hire salespersons from Britain to represent their products,etc. Question: When the...
3
by: Matthias HALDIMANN | last post by:
My SQL Server 2000 does not use the accent insensitive collation setting (collation containing _AI) in full-text serches: While SELECT * FROM <table> WHERE <column> LIKE '%a%' returns 'Mäuse',...
20
by: TomatoeMan | last post by:
I'm using the following script on my web site. I have done this in order to keep web spider programs from harvesting my email address. I want to have the "Subject" line filled in also. Does...
43
by: David Trimboli | last post by:
In a text, I might want to include a foreign language term. In print, this is typically shown with italics. For instance (asterisks represent italics): 'I thought it was only a kind of *cram,*...
1
by: Fabrice | last post by:
Hello, I have encountered a deep problem with accent and I don't understand why. I m preparing a multi-language website. French and English so far. With french, we have accents and ......
0
by: Fabrice | last post by:
Hello, (Alain) Tis is a part of my code to retrieve text from hastable in memory cache, by reading (befor) a resources file. Thanks for your help. /1/ The resources file * I have create a...
9
by: sonal | last post by:
Hi all, I hv started with python just recently... and have been assigned to make an utility which would be used for data validations... In short we take up various comma separated data files for...
3
by: synergy_711 | last post by:
I feel like this should be fairly easy but I have been struggling with this for sometime. I have not been able to find someone who's had the same problem as mine yet. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.