Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ride9650

macrumors 6502
Original poster
Subject says all.

Been using the "replace" method. I've tried to simply find it in the string, as well as searching for it as a regular expression and just can't seem to get rid of it!

thanks!
 
Sure!
And the text encoding is UTF-8

Code:
$.getJSON('/twitmap/process/',function(json,status){
		
			
			$.each(json.results,function(i,tweet){
				
			//other non-relevant code
				
				
			
			   $(".result").append('<p>'+tweet.location.replace(/iPhone:/,"").replace(/ÜT:/,"").replace(/Pre:/,"")+'</p><br/>');
			  

			   
			});
			
				
		});

EDIT:Almost forgot, this might be important too:
(I know I don't have to use PHP to initiate the search but for some reason my client wants me to)
Code:
$ch = curl_init();
		
		$query = "&q=twitter&rpp=10&geocode=37.781157,-122.398720,9mi";
		$url = "http://search.twitter.com/search.json?callback=?".$query;
		
		//options
		curl_setopt($ch,CURLOPT_URL,$url);
	
		$results = str_replace("ÜT:"," ",curl_exec($ch));
		
		
		
		curl_close($ch);
 
Ah! Figured it out. Thank you very much Anglewatt for asking about the encoding because that made me think of how I saw "\u00dcT:" in the returned unaltered JSON stream instead of "ÜT:". I had figured that the encoding was probably to blame but for some reason didn't think of trying to search and replace "\u00dcT:"

thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.