fix an encoding issue of QgsPalLabeling (fix #8347)

This fixes http://hub.qgis.org/issues/8347.

```
QString param = (const char *)getLayerName();
```

If the result of getLayerName() includes non-ascii characters, the above conversion causes character corruption (fromAscii() function is used for the conversion [1]). It should be handle properly.

[1] QString | Documentation | Qt Project https://qt-project.org/doc/qt-4.7/qstring.html