From ca6c6dd6d383d03178b62ff36c7b8b4b6e8f2582 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 7 Feb 2021 13:02:31 +0000 Subject: [PATCH] Text-animation: fix missing encoding specification Ensure we can pass full UTF-8 strings into text animations. Will consider for back-port after discussion on the devel list. Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2512/ --- simgear/scene/model/SGText.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/scene/model/SGText.cxx b/simgear/scene/model/SGText.cxx index d47b5337..21fc0c8f 100644 --- a/simgear/scene/model/SGText.cxx +++ b/simgear/scene/model/SGText.cxx @@ -80,7 +80,7 @@ void SGText::UpdateCallback::operator()(osg::Node * node, osg::NodeVisitor *nv ) // be lazy and set the text only if the property has changed. // update() computes the glyph representation which looks // more expensive than a the above string compare. - text->setText( buf ); + text->setText( buf, osgText::String::ENCODING_UTF8 ); text->update(); } traverse( node, nv );