KhronosGroup / KhronosGroup/GLSL
What kind of white space is allowed in GLSL source? Is UTF-8 BOM allowed or not?
- Dominant language
- JavaScript
- Stars
- 458
- Forks
- 114
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
Research direction
Start by reading GLSL specification section 3.1, “Character Set and Phases of Compilation,” and compare its wording about Unicode UTF-8 with the reported implementation behavior. Done would be an agreed clarification of whether whitespace and a UTF-8 BOM are permitted, recorded in the specification.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100