QueryString with truncated chinese strings

  • Thread starter Thread starter Lara Grillo
  • Start date Start date
L

Lara Grillo

In an Asp.Net application on an chinese operative system, the string (in
chinese characters) returned by querystring function is truncated.

example:

in querystring I set Title= ??

C# code:
a = HttpContext.Current.Request.QueryString["Title"];

after the call the last char is cutted out
a =?

this doesn't happen for all strings, and does not depend on the string
length

I use a javascript for combine the url:
location.href = 'HistoryPage.aspx?Title=??';

when I use a no-chinese OS it works properly
please help

Lara
 
Lara said:
In an Asp.Net application on an chinese operative system, the string
(in chinese characters) returned by querystring function is truncated.

example:

in querystring I set Title= ??

C# code:
a = HttpContext.Current.Request.QueryString["Title"];

after the call the last char is cutted out
a =?

this doesn't happen for all strings, and does not depend on the string
length

I use a javascript for combine the url:
location.href = 'HistoryPage.aspx?Title=??';

when I use a no-chinese OS it works properly
please help

Lara

This usually means that the query string's encoding and the expected
request encoding don't match. What requestEncoding did you specify in
web.config?

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top