Sign in to follow this  
jers

URL Encoding displaying as strange characters on serverside

Recommended Posts

Hello everyone,

 

I am having an issue with a querystring being handed to PHP that I haven't been able to search a solution for.

 

given:

 


url = 'index.php?loadGraph=high_duration&exportXML=true&parameter='+globParameter+'&conditions='+filterCondStr;

getChartFromId('high_duration_chart').setDataURL(url);

 

 

 

Where filterCondStr = " AND task_name LIKE '%bas%'"

 

 

 

Gives me strange output for the value of $_GET['conditions'] on the PHP end, namely:

 

" AND task_name LIKE '

Share this post


Link to post
Share on other sites

I was able to solve my problem and I'll post my resolution here for posterity in case someone else runs into the problem.

 

I originally thought the issue stemmed from the fact that MSSQL has trouble with UTF-8... and by trouble I mean it can't handle it at all.

 

 

 

In the end, I replaced the %'s in my query with %25's via

 

string.replace(/%/, "%25")

 

And this seems to be working, I will update when I have done more testing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this