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

How html links are encoded?

I recently changed our web pages to be utf-8 encoded (server response header content type is also set to utf-8). There are some links to external sites within the pages that pass parameters that can have special characters. Example:

http://Google.com?addressLine1=Hasselvænget

When the parameter gets loaded by the external site, the æ renders as æ, which is I guess the UTF-8 encoded value.

I used an http request analyzer to analyze the GET request that I'm sending via the link and it turns out the my GET request is:

http://Google.com?addressLine1=Hasselvænget.

However, if I open a new browser manually and just type in http://Google.com?addressLine1=Hasselvænget directly (not coming from my page), then the value is rendered fine æ is rendered as æ.

The question is, is there any way that a link from my UTF-8 encoded page can send a GET request that does not have UTF-8 encoded characters? Meaning can I send æ instead of æ or does the browser do this automatically w/out any chance of controlling the behavior? Any javascript I can use to ensure that the GET request for my link is set as æ instead of æ?

By the way I'm using IE6 and have no control over the external site. The external site does not even render a META tag with the charset of the page.

Thanks in advance to anyone that has any insights on this.
Jul 3 '07 #1
3 1341
r035198x
13,262 8TB
I recently changed our web pages to be utf-8 encoded (server response header content type is also set to utf-8). There are some links to external sites within the pages that pass parameters that can have special characters. Example:

http://Google.com?addressLine1=Hasselvænget

When the parameter gets loaded by the external site, the æ renders as æ, which is I guess the UTF-8 encoded value.

I used an http request analyzer to analyze the GET request that I'm sending via the link and it turns out the my GET request is:

http://Google.com?addressLine1=Hasselvænget.

However, if I open a new browser manually and just type in http://Google.com?addressLine1=Hasselvænget directly (not coming from my page), then the value is rendered fine æ is rendered as æ.

The question is, is there any way that a link from my UTF-8 encoded page can send a GET request that does not have UTF-8 encoded characters? Meaning can I send æ instead of æ or does the browser do this automatically w/out any chance of controlling the behavior? Any javascript I can use to ensure that the GET request for my link is set as æ instead of æ?

By the way I'm using IE6 and have no control over the external site. The external site does not even render a META tag with the charset of the page.

Thanks in advance to anyone that has any insights on this.
Moved to web related forum.
Jul 3 '07 #2
kovik
1,044 Expert 1GB
URLs cannot legally contain special characters. Every web development language has a URL encoding function. Look it up for whichever you are using.
Jul 3 '07 #3
praveen2gupta
201 100+
I recently changed our web pages to be utf-8 encoded (server response header content type is also set to utf-8). There are some links to external sites within the pages that pass parameters that can have special characters. Example:

http://Google.com?addressLine1=Hasselvænget

When the parameter gets loaded by the external site, the æ renders as æ, which is I guess the UTF-8 encoded value.

I used an http request analyzer to analyze the GET request that I'm sending via the link and it turns out the my GET request is:

http://Google.com?addressLine1=Hasselvænget.

However, if I open a new browser manually and just type in http://Google.com?addressLine1=Hasselvænget directly (not coming from my page), then the value is rendered fine æ is rendered as æ.

The question is, is there any way that a link from my UTF-8 encoded page can send a GET request that does not have UTF-8 encoded characters? Meaning can I send æ instead of æ or does the browser do this automatically w/out any chance of controlling the behavior? Any javascript I can use to ensure that the GET request for my link is set as æ instead of æ?

By the way I'm using IE6 and have no control over the external site. The external site does not even render a META tag with the charset of the page.

Thanks in advance to anyone that has any insights on this.

Hi

I have tryied to understand your problem.

1. The HTML will send the url by applying page encoding. If your page is in utf-8
then it will send it in utf-8 and the receiver will understand it properly.

2. In your case i have tried it on the utf-8 encoding and i am getting following in the url. Which are the utf-8 characters.
Expand|Select|Wrap|Line Numbers
  1.  
  2. http://www.google.com/?addressLine1=Hasselv%E6%AE%A7et
  3.  
3. Your url code is different than as above . I thinks Your page encoding is not working. So pls. check it and test it properly. The problem area is encoding of page is not effective.
Jul 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Donald Firesmith | last post by:
Are html tags allowed within meta tags? Specifically, if I have html tags within a <definition> tag within XML, can I use the definition as the content within the <meta content="description> tag? ...
6
by: Jerry Werner | last post by:
I need to replace my email address on hundreds of web pages with a new address (in a graphic, not a mailto) in order to thwart the email harvesters that spammers are using. Ideally, I'd like to do...
24
by: chri_schiller | last post by:
I have a home-made website that provides a free 1100 page physics textbook. It is written in html and css. I recently added some chinese text, and since that day there are problems. The entry...
3
by: darrel | last post by:
We have a parent-child table set up to maintain content. When this table is updated, I do a recursive call through the data and spit out an XML file. Then, when we want to display this...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.