[Scons-users] env.Substfile() on files encoded with non UTF-8 (UTF-16).

Tim Jenness tjenness at lsst.org
Tue Dec 12 10:58:25 EST 2017


You might have to add an argument somewhere to tell SCons what the encoding is in files it is parsing.

> On Dec 12, 2017, at 08:46, Bill Deegan <bill at baddogconsulting.com> wrote:
> 
> Yes. That should be fine.
> 
> Please file a bug in scons.tigris.org <http://scons.tigris.org/>
> We'll have to resolve this.
> 
> On Tue, Dec 12, 2017 at 1:31 AM, Dmitry Igrishin <dmitigr at gmail.com <mailto:dmitigr at gmail.com>> wrote:
> 
> 
> 2017-12-12 5:40 GMT+03:00 Bill Deegan <bill at baddogconsulting.com <mailto:bill at baddogconsulting.com>>:
> I don't have a clean fix for you, but you might try changing get_text_contents() in SCons/Node/FS.py to be the same as get_contents()
> (Comment out current get_text_contents) in class File(..), and then get_text_contents=get_contents
> 
> See if that solves the problem for u?
> Changing sources of the SCons is undesirable for us. What if monkeypatch SCons.Node.FS.File in the custom Tool definition like that:
> 
>   import sys
>   import re
>   from SCons.Builder import Builder
>   from SCons.Environment import *
> 
>   SCons.Node.FS.File.get_text_contents = SCons.Node.FS.File.get_contents
> 
>   # ...
> 
> Is it safe to monkeypatch SCons like above?
> 
> PS. I've tested it and it seems to works.
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171212/44e7a42a/attachment-0001.html>


More information about the Scons-users mailing list