Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 699
  • Last Modified:

Sending foreign characters from page to page using query string

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
Relegence
Asked:
Relegence
  • 6
  • 5
  • 2
1 Solution
 
Airyck666Commented:
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
 
Airyck666Commented:
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
 
RelegenceAuthor Commented:
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.

 
Michel PlungjanIT ExpertCommented:
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
 
RelegenceAuthor Commented:
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
 
Michel PlungjanIT ExpertCommented:
So you need to make UTF-8 work.
0
 
RelegenceAuthor Commented:
But It didn't :-(
0
 
Michel PlungjanIT ExpertCommented:
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
 
RelegenceAuthor Commented:
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
 
Michel PlungjanIT ExpertCommented:
Where does name come from - a form or a database?
0
 
RelegenceAuthor Commented:
The user inserts it to a textbox. I am trying to send it to a modalWindow and there it "breaks"
0
 
Michel PlungjanIT ExpertCommented:
Try the attached


utf8test.zip
0
 
RelegenceAuthor Commented:
Thank you.

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 6
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now