⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 293307 in webkit


Ignore:
Timestamp:
Apr 24, 2022, 2:16:48 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Use utf-8 for text mode files in generate-automation-atom.py
https://bugs.webkit.org/show_bug.cgi?id=239542

Patch by Daniel Kolesa <Daniel Kolesa> on 2022-04-24
Reviewed by Adrian Perez de Castro.

At least with older versions of python (3.6), this will otherwise
be ascii, which will break input files that contain non-ascii
characters, e.g. Source/WebKit/UIProcess/Automation/atoms/FindNodes.js

  • Scripts/generate-automation-atom.py:

(main):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r293299 r293307  
     12022-04-24  Daniel Kolesa  <dkolesa@igalia.com>
     2
     3        Use utf-8 for text mode files in generate-automation-atom.py
     4        https://bugs.webkit.org/show_bug.cgi?id=239542
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        At least with older versions of python (3.6), this will otherwise
     9        be ascii, which will break input files that contain non-ascii
     10        characters, e.g. Source/WebKit/UIProcess/Automation/atoms/FindNodes.js
     11
     12        * Scripts/generate-automation-atom.py:
     13        (main):
     14
    1152022-04-23  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebKit/Scripts/generate-automation-atom.py

    r290890 r293307  
    7676    utils = os.path.join(os.path.dirname(input), "utils.js")
    7777
    78     with open(input, "r") as fd:
     78    with open(input, "r", encoding="utf-8") as fd:
    7979        input_data = fd.read()
    8080
     
    8888        input_data = input_data.replace('"use strict";\n', '"use strict";\n\n' + "\n".join(utils_data))
    8989
    90     with open(output, "w") as fd:
     90    with open(output, "w", encoding="utf-8") as fd:
    9191        fd.write(input_data)
    9292
Note: See TracChangeset for help on using the changeset viewer.