mirror of
https://github.com/apache/cordova-android.git
synced 2026-02-21 00:02:46 +08:00
Issue 60: Contact search unicode problem
Contact search was not working for unicode letters. The CallbackServer was changed so that it returned url encode strings. On the JavaScript side the PhoneGap callback handler decodes the returned string.
This commit is contained in:
@@ -13,6 +13,7 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
@@ -221,7 +222,10 @@ public class CallbackServer implements Runnable {
|
||||
}
|
||||
else {
|
||||
//System.out.println("CallbackServer -- sending item");
|
||||
response = "HTTP/1.1 200 OK\r\n\r\n"+this.getJavascript();
|
||||
response = "HTTP/1.1 200 OK\r\n\r\n";
|
||||
String js = this.getJavascript();
|
||||
if (js != null)
|
||||
response += URLEncoder.encode(js, "UTF-8");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user