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

Bill Deegan bill at baddogconsulting.com
Tue Dec 12 10:46:36 EST 2017


Yes. That should be fine.

Please file a bug in scons.tigris.org
We'll have to resolve this.

On Tue, Dec 12, 2017 at 1:31 AM, Dmitry Igrishin <dmitigr at gmail.com> wrote:

>
>
> 2017-12-12 5:40 GMT+03:00 Bill Deegan <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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171212/76146e2c/attachment.html>


More information about the Scons-users mailing list