Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java	(revision 34336)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java	(revision 34337)
@@ -127,5 +127,5 @@
      */
     private double[] getLengthAndDirection(ImageryOffset offset) {
-        AbstractTileSourceLayer layer = ImageryOffsetTools.getTopImageryLayer();
+        AbstractTileSourceLayer<?> layer = ImageryOffsetTools.getTopImageryLayer();
         double[] dxy = layer == null ? new double[] {0.0, 0.0} :
                 new double[] {layer.getDisplaySettings().getDx(), layer.getDisplaySettings().getDy()};
@@ -144,5 +144,5 @@
         LatLon correctedCenterLL = proj.eastNorth2latlon(pos.add(-dx, -dy));
         double length = correctedCenterLL.greatCircleDistance(offset.getImageryPos());
-        double direction = length < 1e-2 ? 0.0 : correctedCenterLL.heading(offset.getImageryPos());
+        double direction = length < 1e-2 ? 0.0 : -correctedCenterLL.bearing(offset.getImageryPos());
         if (direction < 0)
             direction += Math.PI * 2;
@@ -253,5 +253,5 @@
         public void updateIcon(LatLon from) {
             distance = from.greatCircleDistance(to);
-            direction = to.heading(from);
+            direction = -to.bearing(from);
         }
 
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/SimpleOffsetQueryTask.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/SimpleOffsetQueryTask.java	(revision 34336)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/SimpleOffsetQueryTask.java	(revision 34337)
@@ -9,4 +9,5 @@
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.nio.charset.StandardCharsets;
 import java.util.Scanner;
 import java.util.regex.Matcher;
@@ -139,5 +140,5 @@
         String response = "";
         if (inp != null) {
-            Scanner sc = new Scanner(inp).useDelimiter("\\A");
+            Scanner sc = new Scanner(inp, StandardCharsets.UTF_8.name()).useDelimiter("\\A");
             response = sc.hasNext() ? sc.next() : "";
         }
