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
Solved

Sending foreign characters from page to page using query string

Posted on 2008-06-15
13
682 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
  • 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…

789 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