string format (??) confusion

BlitzMax Forums/BlitzMax Programming/string format (??) confusion

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This also returns a blank translation:
SuperStrict

Import brl.retro

Local url:String = "ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=" + UrlEncode("WORDHERE") + "&langpair=el%7Cen"

Local stream:TStream = OpenStream("http::" + url)
Assert stream, "Couldn't establish connection"

Print LoadText(stream)

stream.Close()

Function UrlEncode:String(url:String) 
  Local buffer:String
  Local Char:Int
  Local i:Int
	
	For i = 1 To url.Length
	  Char = Asc(Mid(url, i, 1)) 
		
		If(Char >= 48 And Char <= 57) Or (Char >= 65 And Char <= 90) Or (Char >= 97 And Char <= 122) Or Char = 43 Or Char = 45 Or Char = 46 Or Char = 95
			buffer = buffer + Chr(Char) 
			
		Else
			buffer = buffer + "%" + Right(Hex(Char), 2) 
			
		End If
		
	Next
	
   Return buffer

End Function