Using toLatin1 instead of deprecated toLocal8Bit