Eeschema Eagle Import: support UTF-8 for fields
This commit is contained in:
parent
b77ba486ec
commit
0ed7483868
|
@ -103,7 +103,7 @@ long long int ECOORD::ToNanoMeters( int aValue, enum UNIT aUnit )
|
|||
template<>
|
||||
string Convert<string>( const wxString& aValue )
|
||||
{
|
||||
return aValue.ToStdString();
|
||||
return string( aValue.ToUTF8() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1075,13 +1075,9 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
component->AddHierarchicalReference( current_sheetpath, wxString( einstance.part ), unit );
|
||||
|
||||
if( epart->value )
|
||||
{
|
||||
component->GetField( VALUE )->SetText( *epart->value );
|
||||
}
|
||||
component->GetField( VALUE )->SetText( wxString::FromUTF8( epart->value->c_str() ) );
|
||||
else
|
||||
{
|
||||
component->GetField( VALUE )->SetText( symbolname );
|
||||
}
|
||||
|
||||
// Set the visibility of fields.
|
||||
component->GetField( REFERENCE )->SetVisible( part->GetField( REFERENCE )->IsVisible() );
|
||||
|
@ -1102,9 +1098,9 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
|
||||
SCH_FIELD* field;
|
||||
|
||||
if( attr.name == "NAME" || attr.name == "VALUE" )
|
||||
if( attr.name == "name" || attr.name == "value" )
|
||||
{
|
||||
if( attr.name == "NAME" )
|
||||
if( attr.name == "name" )
|
||||
{
|
||||
field = component->GetField( REFERENCE );
|
||||
nameAttributeFound = true;
|
||||
|
|
Loading…
Reference in New Issue