MantisBT - LibSVGTiny |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0002599 | LibSVGTiny | [All Projects] General | public | 2018-05-11 06:36 | 2026-10-05 23:02 |
|
| Reporter | Felix S. | |
|---|
| Assigned To | Vincent Sanders | |
|---|
| Priority | normal | Severity | minor | Reproducibility | always |
|---|
| Status | resolved | Resolution | fixed | |
|---|
| Platform | | OS | | OS Version | |
|---|
| Fixed in CI build # | |
|---|
| Reported in CI build # | |
|---|
|
| Summary | 0002599: libsvgtiny uses sscanf() to parse decimal fractions in path data, which is locale-dependent |
|---|
| Description | libsvgtiny uses the C standard library function sscanf() to parse decimal fractions into floating-point values. Unfortunately, the exact format accepted by this function is locale-dependent. This makes parsing fail in locales where the decimal point character is different from '.'.
Given that sscanf() does not offer a portable way to enforce locale-independent parsing, libsvgtiny should probably implement its own fraction-parsing function from scratch. |
|---|
| Steps To Reproduce | 0. Ensure that the de_DE.UTF-8 locale (or any other locale with decimal point ',') is available on your system.
1. In libsvgtiny's test/data/ directory, launch `LC_NUMERIC=de_DE.UTF-8 netsurf-fb file://`pwd`/tiger.svg` from the shell (replacing de_DE.UTF-8 with the respective locale if necessary).
2. Observe numerous 'parse failed at ...' messages in the console.
3. In the same directory, launch `LC_NUMERIC=C netsurf-fb file://`pwd`/tiger.svg`.
4. Observe no failure messages.
|
|---|
| Tags | No tags attached. |
|---|
| Relationships | |
| Attached Files | |
|---|