Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sending foreign characters from page to page using query string

Posted on 2008-06-15
13
Medium Priority
?
697 Views
Last Modified: 2011-10-19
Hello,

I posted a question earlier today about problem with foreign characters. I thought that the problem was solved but, actually, it was partially solved.

I am trying to send parameters from 1 page to another using query string, the following way:

var retVal = window.showModalDialog('EntitiesList.aspx?name=" + name, window, 'dialogWidth:220px');

When my 'name' parameter contains foreign characters (for example, Montó or María), the value received at the destination page has a square (box) instead of the special letter.
I was offered to change the encoding of the application to "ISO-8859-1" and so i did.
It helped with some of the characters but not with all characters.
For example, it helped with French but not Hebrew characters.

Is there a way to transfer all kinds of characters from 1 page to another?

Thank you
0
Comment
Question by:Relegence
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 2

Expert Comment

by:Airyck666
ID: 21790187
You need to encode the url (and decode when reading the url)

var url = encode("EntitiesList.aspx?name=" + name);
var retVal = window.showModalDialog(url, window, 'dialogWidth:220px');

Open in new window

0
 
LVL 2

Expert Comment

by:Airyck666
ID: 21790193
Sorry.......... Correction... don't know what I was thinking.  it's escape() and unescape()
var url = escape("EntitiesList.aspx?name=" + name);
var retVal = window.showModalDialog(url, window, 'dialogWidth:220px')

Open in new window

0
 

Author Comment

by:Relegence
ID: 21790978
Thanks but that didn't help...
0
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21791223
What codepage is the result page in and what codepage is the page where you enter the data?

Make both UTF-8 and you should be ok
0
 

Author Comment

by:Relegence
ID: 21791278
I tried UTF-8 and it didn't help.
What did help was changing the encoding to 'iso-8859-1' but this is only a partial solution because it is only for latin charactersa and i need a solution for all languages.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21791397
So you need to make UTF-8 work.
0
 

Author Comment

by:Relegence
ID: 21791449
But It didn't :-(
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21791488
That is not a very complete reply.

If you send data in 8859-1 and just change the codepage, it will not work

The data you have must be in UTF-8, it obviously is not.

So I repeat. You need to make UTF-8 WORK and not just change a line somewhere, see it does not work and then give up...
0
 

Author Comment

by:Relegence
ID: 21791538
sorry, i probably missed something.
I don't know how to make utf-8 work. What should I do in order to make it work?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21791598
Where does name come from - a form or a database?
0
 

Author Comment

by:Relegence
ID: 21791633
The user inserts it to a textbox. I am trying to send it to a modalWindow and there it "breaks"
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 2000 total points
ID: 21791739
Try the attached


utf8test.zip
0
 

Author Comment

by:Relegence
ID: 21791895
Thank you.

I'll try to use that in my application.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question