chubin / wttr.in

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

feature request: ISO-8859-1 (Latin1) output #294

Open vMarkus opened 5 years ago

vMarkus commented 5 years ago

Hi,

[tldr] please add an option so the output is presented in ISO-8859-1 (Latin1) format. For example this could be added to ?format section or a new option ?compatibility or ?charset [/tldr]

Background: I try to control blinds and shutters regarding on weather and wind condition. Unfortunately the scripting engine is only compatible with the mentioned character set ISO-8859-1 (Latin1).

So +20°C ↖13 km/h 46% becomes

HmIP_Script_CUxD_Variable

which screws up the values, too (Screenshot as copy & paste screws it up even further).

So wind indication could be ↑ south ↗ south-west → west ↘ north-west ↓ north ↙ north-east ← east ↖ south-east or a shortened form of it like S, SW, ...

I guess this will have some drawback on condition %c with the nice weather symbols on the other hand, but only when in compatibility mode the symbols like sunny, cloudy etc are not printed to the output - one would simply get a string of the condition.

vMarkus commented 5 years ago

can be ignored - someone helped me transforming the output to Latin1 in my script.

Leaving it open, maybe this is useful for someone else. If not please close :-)

chubin commented 5 years ago

@vMarkus I think it is a pretty useful feature, and should be implemented. iconv and other tools alike are not always installed on the computer, where you access wttr.in from, so it would be really great to have such feature