- appendWithSep(resultRemainder, keyDisplayName(key, temp))
- .append("=")
- .append(keyValueDisplayName(key, value, temp2));
+ keyDisplayName(key, temp);
+ keyValueDisplayName(key, value, temp2);
+ if (temp2 != UnicodeString(value, -1, US_INV)) {
+ appendWithSep(resultRemainder, temp2);
+ } else if (temp != UnicodeString(key, -1, US_INV)) {
+ UnicodeString temp3;
+ Formattable data[] = {
+ temp,
+ temp2
+ };
+ FieldPosition fpos;
+ status = U_ZERO_ERROR;
+ keyTypeFormat->format(data, 2, temp3, fpos, status);
+ appendWithSep(resultRemainder, temp3);
+ } else {
+ appendWithSep(resultRemainder, temp)
+ .append((UChar)0x3d /* = */)
+ .append(temp2);
+ }