From b31b81ba43e6866003268bcd57cbebff57df5ac7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Jan 2025 12:55:59 +0300 Subject: =?UTF-8?q?fixes=20#4849=20(Weather:=20=D0=BD=D0=B5=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=D1=81=D1=8F=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D1=80=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Weather/src/weather_data.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp index 0db004f987..9cc0a3c9cc 100644 --- a/protocols/Weather/src/weather_data.cpp +++ b/protocols/Weather/src/weather_data.cpp @@ -163,7 +163,12 @@ void CWeatherProto::EraseAllInfo() ///////////////////////////////////////////////////////////////////////////////////////// -static wchar_t rumbs[][16] = { L"N", L"NNE", L"NE", L"ENE", L"E", L"ESE", L"ES", L"SSE", L"S", L"SSW", L"SW", L"WSW", L"W", L"WNW", L"WN", L"NNW" }; +static wchar_t rumbs[][16] = { + LPGENW("N"), LPGENW("NNE"), LPGENW("NE"), LPGENW("ENE"), + LPGENW("E"), LPGENW("ESE"), LPGENW("ES"), LPGENW("SSE"), + LPGENW("S"), LPGENW("SSW"), LPGENW("SW"), LPGENW("WSW"), + LPGENW("W"), LPGENW("WNW"), LPGENW("WN"), LPGENW("NNW") +}; static wchar_t *degree2str(double angle) { @@ -171,10 +176,10 @@ static wchar_t *degree2str(double angle) for (int i = 0; i < _countof(rumbs); i++, a += 22.5) if (angle < a) - return rumbs[i]; + return TranslateW(rumbs[i]); // area between 348.75 & 360 degrees - return L"N"; + return TranslateT("N"); } void CWeatherProto::ConvertDataValue(WIDATAITEM *p) -- cgit v1.2.3