diff --git a/common/eda_text.cpp b/common/eda_text.cpp index f9a772368f..ad3e61048a 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -189,14 +189,14 @@ void EDA_TEXT::Serialize( google::protobuf::Any &aContainer ) const using namespace kiapi::common; types::Text text; - text.set_text( GetText().ToStdString() ); - text.set_hyperlink( GetHyperlink().ToStdString() ); + text.set_text( GetText().ToUTF8() ); + text.set_hyperlink( GetHyperlink().ToUTF8() ); PackVector2( *text.mutable_position(), GetTextPos() ); types::TextAttributes* attrs = text.mutable_attributes(); if( GetFont() ) - attrs->set_font_name( GetFont()->GetName().ToStdString() ); + attrs->set_font_name( GetFont()->GetName().ToUTF8() ); attrs->set_horizontal_alignment( ToProtoEnum( GetHorizJustify() ) ); diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 973fc69516..0c23804bcb 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -322,8 +322,8 @@ void FOOTPRINT::Serialize( google::protobuf::Any &aContainer ) const def->mutable_id()->CopyFrom( kiapi::common::LibIdToProto( GetFPID() ) ); // anchor? - def->mutable_attributes()->set_description( GetLibDescription().ToStdString() ); - def->mutable_attributes()->set_keywords( GetKeywords().ToStdString() ); + def->mutable_attributes()->set_description( GetLibDescription().ToUTF8() ); + def->mutable_attributes()->set_keywords( GetKeywords().ToUTF8() ); // TODO: serialize library mandatory fields @@ -350,7 +350,7 @@ void FOOTPRINT::Serialize( google::protobuf::Any &aContainer ) const wxStringTokenizer tokenizer( group, " " ); while( tokenizer.HasMoreTokens() ) - netTie->add_pad_number( tokenizer.GetNextToken().ToStdString() ); + netTie->add_pad_number( tokenizer.GetNextToken().ToUTF8() ); } for( PCB_LAYER_ID layer : GetPrivateLayers().Seq() )