Open Zaltora opened 6 years ago
This limitation is due to the default newlib being built to use the 'nano' io functions, see stdio/nano-vfscanf_float.c
which hard codes the decimal point character. So if this is important you will need to recompile newlib configured not to use the nano variants, and then you might find that it does not link, overflows the iram, so might have the remove printf from iram too.
If it is hard coded, why use dot with sscanf don't work ? ( this function call other things that need coma ? ) My solutions:
Thank for your help!
I found a bug, i post here but not sure if it is related to esp-open-rtos. I was trying
#include <locale.h>
I want to change "." into "," when using float and printf, sprintf, ... In my main, i do this :After this, printf and sprintf work well, using coma instead of dot. but the function sscanf (maybe scanf ? ) didn't work with float. Example : before (with dot config):
=> sscanf( "123.123", "%f", &value) => value = 123.123 (Dot) after (with coma config) : => sscanf( "123,123", "%f", &value) => value = 123,0 (Coma) => sscanf( "123.123", "%f", &value) => value = 123.0 (Dot)