some preparations for Qt5
fixed encoding for rs.print()