Changes to use proper encoding when importing device names

See #96, needs testing