aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocode
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-08-19 22:20:31 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2012-08-19 22:20:31 +0400
commit22a8d46522824151f71c53f3fcab5e3b0d72f608 (patch)
tree3bb059be22e928839ff2dd4171eb9c4205d8ac51 /src/org/traccar/geocode
parentb0b93983f5411ceffc649d44d55093b04ddf802a (diff)
parente7660ab714ee237ce080eaf14f5ab7f1997bea3f (diff)
downloadtrackermap-server-22a8d46522824151f71c53f3fcab5e3b0d72f608.tar.gz
trackermap-server-22a8d46522824151f71c53f3fcab5e3b0d72f608.tar.bz2
trackermap-server-22a8d46522824151f71c53f3fcab5e3b0d72f608.zip
Merge branch 'williamchitto-master'
Diffstat (limited to 'src/org/traccar/geocode')
-rw-r--r--src/org/traccar/geocode/GoogleReverseGeocoder.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/org/traccar/geocode/GoogleReverseGeocoder.java b/src/org/traccar/geocode/GoogleReverseGeocoder.java
index 724c60e50..a25f60d66 100644
--- a/src/org/traccar/geocode/GoogleReverseGeocoder.java
+++ b/src/org/traccar/geocode/GoogleReverseGeocoder.java
@@ -19,6 +19,8 @@ import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
+import java.nio.charset.Charset;
+
import org.traccar.helper.Log;
/**
@@ -36,8 +38,10 @@ public class GoogleReverseGeocoder implements ReverseGeocoder {
try {
URL url = new URL("http://maps.googleapis.com/maps/api/geocode/json?latlng=" + latitude + "," + longitude + "&sensor=false");
URLConnection connection = url.openConnection();
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(connection.getInputStream()));
+
+ connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
+
+ BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),Charset.forName("UTF-8")));
// Find address line
String line;