Skip to content

Build generates empty scripts when GraphML contains a UTF-8 BOM #666

Open

Description

@luqq-md

I noticed something strange while testing the build command on Windows. I created two identical workflows, but saved one of them with a UTF-8 BOM at the beginning of the GraphML file.
Both workflows passed validation, and the build command reported success. However, the generated files were different. The normal workflow generated its scripts correctly, while the one with the BOM produced empty build.bat, run.bat and debug.bat files.
I also checked how the generator reads the GraphML file. Without the BOM, it detects the node correctly, but with the BOM, it detects zero nodes and still finishes without reporting an error.

It seems the generator isn't handling UTF-8 BOM-prefixed GraphML files correctly.

Steps to reproduce

  1. Create a project using concore init
  2. Make a copy of its workflow.graphml
  3. Add a UTF-8 BOM (EF BB BF) to the beginning of the copied file
  4. Run concore validate on both workflows
  5. Build both using --type windows
  6. Compare the generated batch files
Image Image

Activity

  1. luqq-md commented on Nov 9, 2026

    @luqq-md
    Author

    @pradeeban sir , should the generator handle UTF-8 BOM files directly or should validation catch this and repsort an error ? Please help on this

  2. yadavchiragg commented on Nov 16, 2026

    @yadavchiragg

    Hi! I can take this. The cause is that on Windows open() defaults to cp1252, so the UTF-8 BOM is read as "" and BeautifulSoup finds 0 nodes. mkconcore still exits 0 and writes empty scripts. I'll read the GraphML as utf-8-sig in mkconcore.py, concore inspect and concore validate, and add a test. Opening a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions