Encoding of Generated Patches and Pastebin Plugin

David Narvaez david.narvaez at computer.org
Mon Dec 19 03:53:20 UTC 2011


Before I start, I'd like to say I hate encoding issues...

I was trying out the Pastebin plugin for the patches I sent recently
and I (very) accidentally noticed it has encoding issues. I tracked
the issue down the following patch, which solves my particular test

-    QByteArray bytearray =
"paste_code="+QUrl::toPercentEncoding(urlToData(source->file()), "/");
+    QByteArray bytearray =

that assumes the source of the patch review is in UTF-8, but I guess
we can't assure that, right? Does anybody knows if there's any way to
guarantee all files created for patch review are stored UTF-8 (or any
other encoding as long as it is uniform)? Could that be something
governed by user settings which we can query?

David E. Narváez

More information about the KDevelop-devel mailing list