Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] "Json_read_double" fails on locale for with decimal point is not a period

That’s not good.

I have created a fix.

 

Thanks, Guenther.

 

Eugene

 

From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Guenther Nadbath
Sent: Montag, 04. November 2013 05:06
To: tcf-dev@xxxxxxxxxxx
Cc: Christian Pirker; Manfred Kreutzer
Subject: [tcf-dev] "Json_read_double" fails on locale for with decimal point is not a period

 

Hi All,

 

Consider the “German” locale setting that makes use of the comma for the decimal point.

 

Suggested fix is set “C” locale for the string conversion in file “json.c” in function “json_read_double” (other source locations may apply as well)

 

char *saved_locale;

saved_locale = setlocale(LC_NUMERIC, "C");

n = strtod(buf, &end);

setlocale(LC_NUMERIC, saved_locale);

 

best regards,

Guenther

 

Guenther Nadbath, ABIX GmbH, www.a-bix.com

 



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



Back to the top