setlocale call in libextractor

View: New views
3 Messages — Rating Filter:   Alert me  

setlocale call in libextractor

by Aliaksey Kandratsenka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

I'm having a minor issue with libextractor. I'm using libextractor
through Ruby language bindings. And setlocale call from libextractor
changes localized representation of numbers which causes ruby to do
conversion from numbers to string incorrectly. I understand that it's a
gray area. And that ruby interpreter can be blamed too. But I think that
libraries should avoid global environment changes. And setlocale does
such global change.

What do you think ? Is that call really necessary ?

--
With kind regards,
Aliaksey Kandratsenka <alk@...>



_______________________________________________
libextractor mailing list
libextractor@...
http://lists.gnu.org/mailman/listinfo/libextractor

Re: setlocale call in libextractor

by Christian Grothoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I can only find a call to "setlocale" in "extract.c", which is not part of the
library (extract.c is for the "extract" binary, a stand-alone program).  

What version of LE are you using -- and what line of the code are you
referring to?

Best,

Christian

On Friday 26 June 2009 05:27:11 Aliaksey Kandratsenka wrote:

> Hi.
>
> I'm having a minor issue with libextractor. I'm using libextractor
> through Ruby language bindings. And setlocale call from libextractor
> changes localized representation of numbers which causes ruby to do
> conversion from numbers to string incorrectly. I understand that it's a
> gray area. And that ruby interpreter can be blamed too. But I think that
> libraries should avoid global environment changes. And setlocale does
> such global change.
>
> What do you think ? Is that call really necessary ?



_______________________________________________
libextractor mailing list
libextractor@...
http://lists.gnu.org/mailman/listinfo/libextractor

Re: setlocale call in libextractor

by Aliaksey Kandratsenka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

У Няд, 28/06/2009 у 11:22 -0600, Christian Grothoff піша:
> Hi!
Hi.
>
> I can only find a call to "setlocale" in "extract.c", which is not part of the
> library (extract.c is for the "extract" binary, a stand-alone program).  
>
> What version of LE are you using -- and what line of the code are you
> referring to?
I'm using version 0.5.21 from debian unstable. I've just re-checked and
latest upstream (yours) version 0.5.22 doesn't have setlocale call in
extractor.c. So there's no problem in latest version.

--
Aliaksey Kandratsenka <alk@...>



_______________________________________________
libextractor mailing list
libextractor@...
http://lists.gnu.org/mailman/listinfo/libextractor