Strange locale problem in Deskbar

I’m trying to get the Weather Deskbar icon to work (again…), and run into an interesting problem with the locale settings and converting double to BString.

Maybe someone can shed some light on this, and if it is a bug or a feature.

In short, the Weather app generates a URL in WSOpenMeteo.cpp:

WSOpenMeteo::GetUrl(double longitude, double latitude, DisplayUnit unit)` {
	BString urlString("https://api.open-meteo.com/v1/forecast?latitude=");
	urlString
		<< latString << "&longitude=" << longString
		<< "&daily=weathercode,temperature_2m_max,temperature_2m_min&current_"
		   "weather=true&timeformat=unixtime&timezone=auto";
...

The interesting part is that when running the app, the URL is correctly created as https://api.open-meteo.com/v1/forecast?latitude=41.04&longitude=-74.53&daily=weathercode,temperature_2m_max,temperature_2m_min&current_weather=true&timeformat=unixtime&timezone=auto&temperature_unit=celsius

However, when activating the Deskbar icon, the same method returns https://api.open-meteo.com/v1/forecast?latitude=41,04&longitude=-74,53&daily=weathercode,temperature_2m_max,temperature_2m_min&current_weather=true&timeformat=unixtime&timezone=auto&temperature_unit=celsius

Notice how the latitude/longitude values use comma as decimal separator, which is correct by my locale settings (nb_NO.UTF-8), but not accepted by the OpenMeteo API.

Why does the app (or BString’s “<<” operator) ignore my locale settings in the main window, but not in when running as a Deskbar icon?