Skip to content

UTF-8 with BOM encoding broken: syntax error at or near "" #1007

Description

@Git-me-outta-here

All of my migrations files are UTF-8 except for one, which is UTF-8 with BOM.

That's where I get syntax error at or near ""... Could you allow sqlc to read this encoding?

Activity

  1. added a commit that references this issue on Jul 31, 2021
  2. kyleconroy commented on Sep 12, 2021

    @kyleconroy
    Collaborator

    My plan is to create an internal utfbom package that has one function, DiscardBOM. It will take a byte slice and return a byte slice, which should work for all the cases we read in SQL files.

  3. added this to the v1.11.0 milestone on Sep 12, 2021
  4. bodison commented on Sep 13, 2021

    @bodison

    yeah would be fine as well. or a package that wraps the file reader?

    As I mentioned in the closed PR, the test coverage of these four files would be a separate issue.

  5. removed this from the v1.11.0 milestone on Jan 31, 2022
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