globallightingdata / gldf

Global Lighting Data Format
https://gldf.io
MIT License
15 stars 5 forks source link

Special characters in names #26

Closed sandra-prolicht closed 5 months ago

sandra-prolicht commented 5 months ago

How should we handle special characters in names? We frequently have °, Ø and () in luminare product names. Most characters do not break the gldf, but parenthesis do. I tried to escape it with it's html equivalent (( and )) but the file still does not load in Relux. I did not see any restrictions in schema or on gldf.io. Should we just replace those chars with a dot and if so what chars could be problematic?

Kurpanik commented 5 months ago

Hello Sandra, parenthesis should be indeed escaped in XML. As follows:

< as &lt;
> as &gt;
( as &#40; 
) as &#41;

Update: ( and ) can, but must not be escaped.

sandra-prolicht commented 5 months ago

Thanks for your quick response. I thought so!

Kurpanik commented 5 months ago

You're welcome!

prolicht-at commented 5 months ago

@Kurpanik why do we need to escape normal characters?

In XML, only those characters need to be escaped:

So GLDF should follow this standard.

Kurpanik commented 5 months ago

Yes, you are right. Brackets of type ( and ) do not need to be escaped as XML content. And since GLDF is based on XML, the same applies here. In DIALux, there are no problems with this. This brackets are accepted both escaped and unescaped. If Relux behaves incorrectly in this regard, I recommend contacting their support team.

prolicht-at commented 5 months ago

Thanks for the clarification!