Index: src/uk/me/parabola/imgfmt/app/mdr/Mdr25.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/mdr/Mdr25.java	(revision 4817)
+++ src/uk/me/parabola/imgfmt/app/mdr/Mdr25.java	(working copy)
@@ -12,6 +12,7 @@
  */
 package uk.me.parabola.imgfmt.app.mdr;
 
+import java.text.Collator;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -37,6 +38,8 @@
 	 */
 	public void sortCities(List<Mdr5Record> list) {
 		Sort sort = getConfig().getSort();
+		Collator collator = sort.getCollator();
+		collator.setStrength(Collator.TERTIARY);
 
 		List<SortKey<Mdr5Record>> keys = new ArrayList<>();
 		for (Mdr5Record c : list) {
@@ -52,9 +55,10 @@
 		for (SortKey<Mdr5Record> key : keys) {
 			Mdr5Record city = key.getObject();
 
-			if (lastCity == null || !city.getName().equals(lastCity.getName())
-					|| !city.getRegionName().equals(lastCity.getRegionName())
-					|| !city.getCountryName().equals(lastCity.getCountryName())) {
+			if (lastCity == null ||
+				collator.compare(city.getName(), lastCity.getName()) != 0 ||
+				collator.compare(city.getRegionName(), lastCity.getRegionName()) != 0 ||
+				collator.compare(city.getCountryName(), lastCity.getCountryName()) != 0) {
 				record++;
 
 				// Record in the 29 index if there is one for this record
@@ -61,8 +65,8 @@
 				Mdr14Record mdrCountry = city.getMdrCountry();
 				Mdr29Record mdr29 = mdrCountry.getMdr29();
 				String name = mdr29.getName();
-				assert mdrCountry.getName().equals(name);
-				if (!name.equals(lastName)) {
+				assert collator.compare(mdrCountry.getName(), name) == 0;
+				if (lastName == null || collator.compare(name, lastName) != 0) {
 					mdr29.setMdr25(record);
 					lastName = name;
 				}
Index: src/uk/me/parabola/imgfmt/app/mdr/Mdr29.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/mdr/Mdr29.java	(revision 4817)
+++ src/uk/me/parabola/imgfmt/app/mdr/Mdr29.java	(working copy)
@@ -83,6 +83,8 @@
 		PointerSizes sizes = getSizes();
 		int size24 = sizes.getSize(24);
 		int size22 = sizes.getSize(22);
+		assert sizes.getNumberOfItems(5) >= sizes.getNumberOfItems(25)
+			: "5:" + sizes.getNumberOfItems(5) + " 25:" + sizes.getNumberOfItems(25);
 		int size25 = sizes.getSize(5);  // NB appears to be size of 5 (cities), not 25 (cities with country).
 		int size26 = has26? sizes.getSize(26): 0;
 		int size17 = Utils.numberToPointerSize(max17);
Index: src/uk/me/parabola/imgfmt/app/mdr/Mdr5.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/mdr/Mdr5.java	(revision 4817)
+++ src/uk/me/parabola/imgfmt/app/mdr/Mdr5.java	(working copy)
@@ -39,6 +39,8 @@
 	private int maxCityIndex;
 	private int localCitySize;
 	private int mdr20PointerSize = 0; // bytes for mdr20 pointer, or 0 if no mdr20
+	private Sort sort;
+	private Collator collator;
 
 	// We need a common area to save the mdr20 values, since there can be multiple
 	// city records with the same global city index
@@ -46,6 +48,9 @@
 
 	public Mdr5(MdrConfig config) {
 		setConfig(config);
+		sort = config.getSort();
+		collator = sort.getCollator();
+		collator.setStrength(Collator.TERTIARY);
 	}
 
 	public void addCity(Mdr5Record record) {
@@ -62,15 +67,14 @@
 	public void preWriteImpl() {
 		allCities.trimToSize();
 		localCitySize = Utils.numberToPointerSize(maxCityIndex + 1);
-		Sort sort = getConfig().getSort();
-		genCitiesAndMdr20s(sort);
+		genCitiesAndMdr20s();
 		// calculate positions for the different road indexes
-		calcMdr20SortPos(sort);
-		calcMdr21SortPos(sort);
-		calcMdr22SortPos(sort);
+		calcMdr20SortPos();  // TODO: Maybe this can be simplified away - see mdr5-simplify-v2.patch 02-Nov-2021
+		calcMdr21SortPos();
+		calcMdr22SortPos();
 	}
 
-	private void genCitiesAndMdr20s(Sort sort) {
+	private void genCitiesAndMdr20s() {
 		List<SortKey<Mdr5Record>> sortKeys = new ArrayList<>(allCities.size());
 		Map<String, byte[]> regionCache = new HashMap<>();
 		Map<String, byte[]> countryCache = new HashMap<>();
@@ -90,7 +94,6 @@
 		sortKeys.sort(null);
 
 		cities = new ArrayList<>(sortKeys.size());
-		Collator collator = sort.getCollator();
 
 		int count = 0;
 		Mdr5Record lastCity = null;
@@ -122,7 +125,7 @@
 	/**
 	 * Calculate a position when sorting by name, region, and country- This is used for MDR20. 
 	 */
-	private void calcMdr20SortPos(Sort sort) {
+	private void calcMdr20SortPos() {
 		List<SortKey<Mdr5Record>> sortKeys = new ArrayList<>(allCities.size());
 		Map<String, byte[]> regionCache = new HashMap<>();
 		Map<String, byte[]> countryCache = new HashMap<>();
@@ -155,7 +158,7 @@
 	/**
 	 * Calculate a position when sorting by region- This is used for MDR21. 
 	 */
-	private void calcMdr21SortPos(Sort sort) {
+	private void calcMdr21SortPos() {
 		List<SortKey<Mdr5Record>> sortKeys = new ArrayList<>(allCities.size());
 		for (Mdr5Record m : allCities) {
 			if (m.getRegionName() == null) 
@@ -181,7 +184,7 @@
 	 * Calculate a position when sorting by country- This is used for MDR22. 
 	 */
 
-	private void calcMdr22SortPos(Sort sort) {
+	private void calcMdr22SortPos() {
 		List<SortKey<Mdr5Record>> sortKeys = new ArrayList<>(allCities.size());
 		for (Mdr5Record m : allCities) {
 			if (m.getCountryName() == null)
@@ -208,7 +211,6 @@
 		Mdr5Record lastCity = null;
 		boolean hasString = hasFlag(0x8);
 		boolean hasRegion = hasFlag(0x4);
-		Collator collator = getConfig().getSort().getCollator();
 		for (Mdr5Record city : cities) {
 			int gci = city.getGlobalCityIndex();
 			addIndexPointer(city.getMapIndex(), gci);
@@ -284,7 +286,7 @@
 		int val = (localCitySize - 1);
 		// String offset is only included for a mapsource index.
 		if (isForDevice() ) {
-			if (!getConfig().getSort().isMulti())
+			if (!sort.isMulti())
 				val |= 0x40; // mdr17 sub section present (not with unicode)
 		} else {
 			val |= 0x04;  // region
Index: src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java	(revision 4817)
+++ src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java	(working copy)
@@ -52,6 +52,7 @@
 	private int partialInfoSize;
 	private Set<String> exclNames;
 	private final Sort sort;
+	private Collator collator;
 	private int maxPrefixCount;
 	private int maxSuffixCount;
 	private boolean magicIsValid;
@@ -60,6 +61,8 @@
 	public Mdr7(MdrConfig config) {
 		setConfig(config);
 		sort = config.getSort();
+		collator = sort.getCollator();
+		collator.setStrength(Collator.SECONDARY); 
 		splitName = config.isSplitName();
 		exclNames = config.getMdr7Excl();
 		codepage = sort.getCodepage();
@@ -217,8 +220,6 @@
 		// list is now sorted by partial name only, we have to group by name and map index now
 		String lastPartial = null;
 		List<Mdr7Record> samePartial = new ArrayList<>();
-		Collator collator = sort.getCollator();
-		collator.setStrength(Collator.SECONDARY);
 		for (int i = 0; i < sorted.size(); i++) {
 			Mdr7Record r = sorted.get(i);
 			String partial = r.getPartialName();
@@ -264,6 +265,12 @@
 		// per map for the same name.
 		for (int i = 0; i < samePartial.size(); i++) {
 			Mdr7Record r = samePartial.get(i);
+			//if (last != null && r.getMapIndex() == last.getMapIndex() && collator.compare(r.getName(), last.getName()) == 0) {
+			// 28Oct2021 Ticker:
+			// Maybe this should use above "collator.compare(x,y)==0" rather than following "x.equals(y)", but this causes
+			// significant differences to various MDR sections when there is the same street name but with different shields
+			// The eTrex Legend HXc supresses these duplicate entries in the list of streets but gives a result for each.
+			// cf. Mdr20 "Only save a single copy of each street name."
 			if (last != null && r.getMapIndex() == last.getMapIndex() && r.getName().equals(last.getName())) {
 				// This has the same name (and map number) as the previous one.
 				// Save the pointer to that one
@@ -283,8 +290,6 @@
 	public void writeSectData(ImgFileWriter writer) {
 		boolean hasStrings = hasFlag(MDR7_HAS_STRING);
 		boolean hasNameOffset = hasFlag(MDR7_HAS_NAME_OFFSET);
-		Collator collator = sort.getCollator();
-		collator.setStrength(Collator.SECONDARY); 
 		Mdr7Record last = null;
 		for (Mdr7Record s : streets) {
 			addIndexPointer(s.getMapIndex(), s.getIndex());
