Home Help Center

Slice file with unicode characters in comments generate invalid python code

mat42xmat42x Member Mathias MuellerOrganization: Objective GmbHProject: Infotainment

In our slice files we use unicode characters in comments.
The slice2py compiler generates python comments, but does not specify an encoding for the python file.
It is possible to force the slice2py compiler to generate an encoding statement at the beginning of the generated python file?
Best regards
Mathias

Best Answers

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    Hi Mathias,

    Unfortunately is not possible to set the encoding statement, we have push a fix to 3.6 branch to add utf-8 encoding comments to all generated files, we will release new 3.6.2 pypi packages shortly

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    Hi Mathias,

    We have uploaded new pip packages with version 3.6.2.1 that include this fix.

    Bests Regards,
    José

  • mat42xmat42x Member Mathias MuellerOrganization: Objective GmbHProject: Infotainment
    Accepted Answer

    Thanks!
    Is this fix also in the 3.7 branch?

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    No yet, we will merge 3.6 to 3.7 shortly

Answers

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    Hi Mathias,

    Unfortunately is not possible to set the encoding statement, we have push a fix to 3.6 branch to add utf-8 encoding comments to all generated files, we will release new 3.6.2 pypi packages shortly

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    Hi Mathias,

    We have uploaded new pip packages with version 3.6.2.1 that include this fix.

    Bests Regards,
    José

  • mat42xmat42x Member Mathias MuellerOrganization: Objective GmbHProject: Infotainment
    Accepted Answer

    Thanks!
    Is this fix also in the 3.7 branch?

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    No yet, we will merge 3.6 to 3.7 shortly

Sign In or Register to comment.