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

Stefan BrĂ¼ns noreply at phabricator.kde.org
Fri Sep 14 13:24:01 BST 2018


bruns added a comment.


  In D15068#325659 <https://phabricator.kde.org/D15068#325659>, @jtamate wrote:
  
  > 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")
  
  
  Please read the full summary again why reading the source as utf-8 is a bad ide - hint: clang expresses ranges in bytes, not codepoints.

REPOSITORY
  R240 Extra CMake Modules

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

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


More information about the Kde-buildsystem mailing list