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,
 
Back
Top