Minus Symbols In The Registry

From FMR Knowledge Base
Jump to navigation Jump to search

Overview

The Registry can disseminate positive and negative data values. However there is an important point regarding the minus symbol that may affect some users of the Registry

For the minus symbol, the Registry can produce two different symbols that in most fonts look very similar:

Symbol Name Unicode Hex
- Hyphen Minus 2D 0x2D
Minus Sign / European Number Separator 2212 0xE2 0x88 0x92

The reason for the different outputs is down to the Java version running the Registry as well as the locale the Registry is producing output for. For some locales, using Java versions prior to Java 9, the "Hyphen Minus" will be output. For Java versions from 9 and above the "Minus Sign" will be output. The rationale for this change is detailed here: https://www.oracle.com/java/technologies/javase/v9-issues-relnotes.html#JDK-8008577

Some users may find this an issue. Some programs, such as Microsoft Excel, do not recognize the "Minus Sign" as a negative number and as such attempting to perform calculations with these numbers may not produce the correct values.

System Property to Revert Behaviour

Java JDKs continue to ship with the legacy JRE locale data and the system property java.locale.providers can be used to configure the lookup order. To enable behavior compatible with JDK 8, the system property can be set with:

-Djava.locale.providers=COMPAT,SPI