From 4fbd5e8e0f9410cc2213c88503169b4c6b890236 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 25 Jan 2019 07:44:53 -0800 Subject: [PATCH] pcbnew: UTF8 strings for MSW display Some MSW seem to have issues with the UTF-8 characters in const wxString. This explictly casts to wxString from UTF-8 handling the platform differences Fixes: lp:1813329 * https://bugs.launchpad.net/kicad/+bug/1813329 --- common/preview_items/arc_assistant.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/preview_items/arc_assistant.cpp b/common/preview_items/arc_assistant.cpp index 0ea4718da1..9f31722b61 100644 --- a/common/preview_items/arc_assistant.cpp +++ b/common/preview_items/arc_assistant.cpp @@ -174,7 +174,7 @@ void ARC_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const double degs = getNormDeciDegFromRad( initAngle ); cursorStrings.push_back( DimensionLabel( "r", m_constructMan.GetRadius(), m_units ) ); - cursorStrings.push_back( DimensionLabel( "θ", degs, DEGREES ) ); + cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), degs, DEGREES ) ); } else { @@ -191,8 +191,8 @@ void ARC_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const // draw dimmed extender line to cursor drawLineWithHilight( aView, origin, m_constructMan.GetLastPoint(), true ); - cursorStrings.push_back( DimensionLabel( "Δθ", subtendedDeg, DEGREES ) ); - cursorStrings.push_back( DimensionLabel( "θ", endAngleDeg, DEGREES ) ); + cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "Δθ" ), subtendedDeg, DEGREES ) ); + cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), endAngleDeg, DEGREES ) ); } // FIXME: spaces choke OpenGL lp:1668455