Skip to content

What kind of white space is allowed in GLSL source? Is UTF-8 BOM allowed or not? #259

@tksuoran

Description

@tksuoran

Reading GLSL specification section 3.1. Character Set and Phases of Compilation, strictly speaking, no kind of white space is mentioned as allowed. This is probably a mistake?
Meanwhile,

The source character set used for the OpenGL Shading Language is Unicode in the UTF-8 encoding scheme.

says encoding is unicode. In unicode, BOM can be considered "zero width no-break space" (at least according to https://en.wikipedia.org/wiki/Non-breaking_space). This leaves open the question regarding how BOM should be treated. I know at least one OpenGL implementation where shader program linking fails when shader source contains BOM.

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