Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2007

Go generated code may fail with "illegal UTF-8 sequence" at "go run"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Go - Compiler
    • Labels:
      None
    • Environment:

      Windows (may be important)

      Description

      struct foo {
        /** allowed range from -100 to +100 °C */
        1 :  double temperature
      }
      

      Leads to

      ./gen-go//Test/ttypes.go:18:52: illegal UTF-8 encoding
      WARNING - Running 'gofmt -w ./gen-go//Test/ttypes.go' failed.
      

      followed by

      $> go run hello.go
      # gen-go/S4P
      gen-go\S4P\ttypes.go:18: illegal UTF-8 sequence
              b0 43
      

        Attachments

        1. invalid-utf8.thrift
          0.1 kB
          Jens Geyer

          Issue Links

            Activity

              People

              • Assignee:
                jensg Jens Geyer
                Reporter:
                jensg Jens Geyer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: