From 06b76612b28183f0a047dac3a4127120d2af1b39 Mon Sep 17 00:00:00 2001 From: hop311 Date: Wed, 31 Jul 2024 23:17:32 +0100 Subject: Use UTF8 encoding and simplify godot string conversion Fixes #180: Province names do not convert non-ascii characters to Unicode --- extension/src/openvic-extension/classes/GFXPieChartTexture.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extension/src/openvic-extension/classes/GFXPieChartTexture.hpp') diff --git a/extension/src/openvic-extension/classes/GFXPieChartTexture.hpp b/extension/src/openvic-extension/classes/GFXPieChartTexture.hpp index 3135050..9642f4e 100644 --- a/extension/src/openvic-extension/classes/GFXPieChartTexture.hpp +++ b/extension/src/openvic-extension/classes/GFXPieChartTexture.hpp @@ -85,7 +85,7 @@ namespace OpenVic { for (size_t idx = 0; idx < array.size(); ++idx) { auto const& [key, val] = sorted_dist[idx]; Dictionary sub_dict; - sub_dict[_slice_identifier_key()] = Utilities::std_view_to_godot_string(key->get_identifier()); + sub_dict[_slice_identifier_key()] = Utilities::std_to_godot_string(key->get_identifier()); sub_dict[_slice_colour_key()] = Utilities::to_godot_color(key->get_colour()); sub_dict[_slice_weight_key()] = val.to_float(); array[idx] = std::move(sub_dict); -- cgit v1.2.3-56-ga3b1