From 33968534fa8d63e8c181c196e2acd61059f56ba9 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Fri, 26 Mar 2021 01:55:38 +0200 Subject: [PATCH] MGRS number translate fix --- .../java/com/jwetherell/openmap/common/MGRSPoint.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java b/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java index 6e99eec8b5..be6793bef8 100644 --- a/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java +++ b/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java @@ -17,6 +17,7 @@ package com.jwetherell.openmap.common; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Locale; public class MGRSPoint extends ZonedUTMPoint { @@ -697,10 +698,9 @@ public class MGRSPoint extends ZonedUTMPoint { all.set(1, shiftChar(all.get(1), eastShift, northShift)); String zero = ""; } - - - all.add(String.format("%0" + accuracy + "d", roundedEasting)); - all.add(String.format("%0" + accuracy + "d", roundedNorthing)); + + all.add(String.format(java.util.Locale.US,"%0" + accuracy + "d", roundedEasting)); + all.add(String.format(java.util.Locale.US,"%0" + accuracy + "d", roundedNorthing)); break; } }