libtexpdf icon indicating copy to clipboard operation
libtexpdf copied to clipboard

get_real in cff_dict.c fails on some locales

Open simoncozens opened this issue 6 years ago • 1 comments
trafficstars

See simoncozens/sile#573. cff_dict.c parses real numbers using the strtod library function. However, when the locale is set to one where LC_NUMERIC sets the decimal point to something other than ., get_real fails because it is expecting the decimal point to be the period character.

We should fix this locally, probably by providing our own non-locale-aware strod, and also notify upstream.

simoncozens avatar Apr 16 '19 19:04 simoncozens

See also: https://stackoverflow.com/questions/1994658/locale-independent-strtod-implementation

simoncozens avatar Apr 16 '19 19:04 simoncozens