chubin / wttr.in

:partly_sunny: The right way to check the weather
https://wttr.in
Apache License 2.0
24.7k stars 1.11k forks source link

Wind speed formatting issue #34

Open dlstadther opened 8 years ago

dlstadther commented 8 years ago

When the min and max wind speeds are both 2 digits, the line formatting becomes pushed to the right and causes mismatched ASCII images.

wttr_wind_speed

mikelietz commented 8 years ago

I don't think it's the two digit numbers - it's the diagonal arrows. Look how Friday morning is fine, but the rest of that day skews.

dlstadther commented 8 years ago

Ah, yes @mikelietz you're correct. I guess I didn't look closely enough.

schachmat commented 8 years ago

That issue is already fixed in wego, @chubin just has to update the version running on his server.

schachmat commented 8 years ago

On second thought, the fix probably won't work for the curl and wget cases, since they won't send their locales and if if they would, wego would have to be called with that respective locale on the server. A workaround might be to change your locales @dlstadther (see the linked PR discussion above) if that is an option.

chubin commented 8 years ago

Actually, it's possible, but you need to pass that info (just a bit of information) in the url. Say, if you add j to the url (curl wttr.in/osaka?j), it could mean "please fix the japan-locales-problem for me).

schachmat commented 8 years ago

As already mentioned the source of the issue is different locales in your own terminal and on the wttr.in server where wego is running. wego does not know your locale, so it can only use the one from the server. To get it correct you would have to somehow pass your locale to the server (no more typing just curl wttr.in/London) and the server software has to be patched to accept this new parameter and invoke wego with this specific locale. Of course the server has to have all possible locales installed and available for this. So the easy fix is to just install wego on your machine and type wego instead of curl wttr.in/London which has another benefit of being even shorter. ;-)

deanturpin commented 7 years ago

FWIW

Ditto in Firefox ESR 45.6.0.

The diagonal arrows are Segoe UI Symbol, the up arrows are Lucida Console. The other bits are Lucida Sans Typewriter Regular.

firefox-45 6 0