some fields in clientraw are displayed with a comma as a decimal point

Issue #44 new
Gary Roderick created an issue

This issue originally raised as a weewx issue here but has been transferred to weewx-WD as it is weewx-WD specific. The original issue text is included below for completeness:

quote

Dear developer, thank you for your awesome work. everything seems to work fine except the quality of the clientraw.txt produced.

here is the client raw from weewx: 12345 0,8 0,8 0 14,5 48 1009,2 4,1 4,1 4,1 1,5 2,1 22,3 60 -- 0 0 0 0 0,0 -100 -100 -100 -100 -100 -100 -100 -100 -100 10 52 00 Quartucciu(CA),Italy-10:52:00 0 -- 21 10 100 100 100 100 100 100 100 14,5 13,3 15,4 13,9 0 --- +1,09 1 2 3 1 0 0 1 1 2 3 1 1 1 1 2 1 2 1 0 1 6,4 3,6 4507.0 21/10/2016 15,3 12,9 15,4 12,5 -- 0 1 2 2 0 2 1 1 0 0 14,0 13,9 14,0 14,1 14,1 14,1 14,2 14,1 14,3 14,4 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 15,4 13,9 14,5 6,4 0 --- --- 0 0 0 0 0 0 0 0 0 0 -- 25,2 22,3 12,8 1010,0 1007,3 6,4 00:11 00:11 14,5 11,3 6,6 3,4 0,8 2016 0 1 1 1 -- 0 0 0 292 0 0 315 -- -- 0 0 0,0 0 39.2537 -9.1747 0 57 48 4,1 00:10 0 0 0 0 0 0 11.7 00:00 08:20 !!EOR!!

and you can see that it is different from the one generated from weather display originally:

12345 0.0 0.0 248 22.1 46 1018.6 0.0 0.0 82.0 0.000 0.000 23.9 60 0.0 5 0.0 0 0 0.0 -100.0 -100.0 -100.0 -100.0 -100.0 -100.0 -100 -100 -100 13 11 23 QuartucciuMeteo-1:11:23_PM 0 0 18 10 100 100 100 100 100 100 100 22.1 23.4 25.1 12.9 5 Nessun_fenomeno -0.3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.1 9.9 5012.1 18/10/2016 28.4 12.0 25.1 12.9 0.0 0.0 0.0 0.0 0.0 0.0 1.5 0.0 0.0 1.2 0.0 22.4 23.0 23.3 23.6 23.7 23.2 22.9 22.6 22.4 22.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 25.1 12.9 22.1 5.0 0 --- --- 248 0 0 -100.0 -100.0 -100 0 0 0 0 0.0 26.9 23.5 22.7 1020.9 1017.9 2 12:44PM 3:06_PM 26.5 12.4 15.1 4.3 0 2016 0.0 -1 1 -1 248 225 212 225 225 248 270 248 301 265 0.0 0.0 0.3 15.4 0.00000 0.00000 0.0 57 41 0.0 7:35_AM - - - - - - 29.9 !!C10.37R76!!

first of all I see that decimals numbers are comma separated and not dot separated.. how can i change this setting? And how can i really change the format of the file? thank you

unquote

Comments (3)

  1. Gary Roderick reporter

    Albes, I believe the comma issue is a locale issue. Can you please confirm which locale you are using. Also you asked:

    And how can i really change the format of the file?

    Can you be more specific, what is it that you want to change?

    Gary

  2. Oz Greg repo owner

    Hmm You cannot change the format but the extra , would be causing the parser no end of issues returning all wrong fields.. The list of countries using a , for the decimal point is long, interesting this has never come up until now...

  3. Gary Roderick reporter

    Yes, interesting it has not come up before. weewx became locale aware at v2.7.0, I suspect though that not too many have gone down the localization path AND used weewx-wd AND be in a country that uses a comma decimal point. No matter, I believe the fix is pretty easy, weewx v3.4.0 introduced a method of ignoring the locale for a tag eg $currrent.outTemp.toString($localize=False) rather than $currrent.outTemp so I am hopeful it is just a case of using .toString($localize=False) on a few (probably many) tags. Just having a few issues getting my VM to change locales so I can test it. Would also be good to know what locale the OP was using.

  4. Log in to comment