Quantity parser is unable to deal with exponents written in
supersript, so change it back to ^n.
The micro prefix is expected to be U+00B5, not U+03BC, so change
it back as well. Note, that \x escape sequence reads till the
whitespace or the end of string, thus microFarad becomes
"\xC2\xB5""F
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
* Base: Fixed segfault on destructing cached string
Xerces default memory manager is deleted before destructing static local
variable and segfault.
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
The new unit schema management is using U+2032 and U+2033 characters
for feet and inches while parser is expecting only ' and ", while
U+2032 and U+2033 are used for arcminute and arcsecond.
While this is not an ideal solution and parser should deal with both,
revert back to ASCII for now.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Fix the transcription error which occured while moving into
single structure. Default schema now uses milimeters again.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Return schemas name and description vectors sorted by number, so
index can be used later to select particular schema.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Fixes: Maintaining schemas is difficult and error-prone
- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
Rename files according 7d233dc ("Gui: Rename generated lexer files
to match core naming pattern"). Note that C space errors (space
before tabs, spaces on blank lines, etc.) still need to be fixed
manually after regenerating lexer file.
* Add unit tests for large digit count in unique names
* Updated to use arbitrary-precision unsigneds
Passes the new unit tests, all diagnostics, and resolves Issue 19881
* Place UnlimitedUnsigned at top level and add unit tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Replace it with a piece of code that replicates the functionality. Also eliminate the round-trip through char * that this function was using (the final variable is stored as a std::string anyway).