D15068: Bindings: Correct handling of sources containing utf-8

Jaime Torres Amate noreply at phabricator.kde.org
Fri Sep 14 07:28:51 BST 2018


jtamate added a comment.


  Another solution (not tested here but used in other projects) could be to use
  with open(source, "r", encoding="utf-8") as f:
  (or if the file could contain the aberration BOM, you could use "utf-8-sig")
  
  And it should convert automatically all kind of line-ends and still return text.
  I'm assuming this is for python 3.5 or later.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D15068

To: bruns, #frameworks
Cc: jtamate, kde-frameworks-devel, kde-buildsystem, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180914/a8e9bae0/attachment.html>


More information about the Kde-frameworks-devel mailing list