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

charset problem with file Autogenerated by Thrift

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.3
    • Component/s: Python - Compiler
    • Labels:
      None
    • Environment:

      ubuntu 9.04,python 2.6

      Description

      i find maybe a problem with the thrift idl file
      i wrote some struct comment in the idl file with chinese characters (Non-ASCII character ).
      then i use thrift generated the python code, it doesn't contains the encoding set comment line:

      # -*- coding: utf-8 -*-

      when i try to run the serv code ,it's cause SyntaxError: Non-ASCII character '\xxx' in file

      maybe we should make a command line option for user to set the encoding.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: