Archived

This forum has been archived. Please start a new discussion on GitHub.

Slice compiler chokes on byte order mark

The slice compiler (slice2cpp) reported an error for nearly every line of the slice file. After some investigation, I found out that the editor inserted a BOM at the beginning of the file, because the encoding was set to UTF8. Adding an extra newline at the beginning of the file seems to be a workaround for this problem.
Are UTF8 encoded slice files supported? Should I avoid the BOM?
Thanks,
Pavel

Comments

  • xdm
    xdm La Coruña, Spain
    Hi Pavel,

    What Ice version and operating system are you using? prior to Ice-3.4.0 Slice files where ACSII, now they accept UTF-8 included the BOM at the beginning.

    See: 4.4.2 File Format
  • slice2cpp -v says 3.4.1
    As said, the problem disappears when the BOM is followed by a newline.
    PB
  • xdm
    xdm La Coruña, Spain
    I cannot reproduce the problem, witch OS are you using?
  • Windows XP.
    The problem appears only if the first line is a #define something.
    It seems that the parser thinks that the define does not start at the first column.
  • xdm
    xdm La Coruña, Spain
    I have reproduced the problem, we will look in to this.

    Thanks for report the problem.
    Jose