Solved

Sending foreign characters from page to page using query string

Posted on 2008-06-15
13
696 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 500 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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…
Suggested Courses

623 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