# mvdXML Rule Grammar and utf-8?

**URL:** <https://forums.buildingsmart.org/t/mvdxml-rule-grammar-and-utf-8/2442>\
**Category:** MVDs\
**Created:** [February 25, 2020, 2:17pm UTC](https://forums.buildingsmart.org/t/mvdxml-rule-grammar-and-utf-8/2442 "2020-02-25T14:17:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noemi](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@Noemi](https://forums.buildingsmart.org/u/Noemi)\
**Post date:** [February 25, 2020, 2:17pm UTC](https://forums.buildingsmart.org/t/mvdxml-rule-grammar-and-utf-8/2442/1 "2020-02-25T14:17:05Z")

</div>

I have got a question, the “Lexer Rules” in “Rule Grammar” don’t contain any language specific characters, such as (german) ß, ö, ä, ü, …, why? Why not utf-8 (or something similar)?

---

<div class="post-metadata">

**Author:** ![sergej](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sergej](https://forums.buildingsmart.org/u/sergej)\
**Post date:** [July 17, 2020, 12:14pm UTC](https://forums.buildingsmart.org/t/mvdxml-rule-grammar-and-utf-8/2442/2 "2020-07-17T12:14:07Z")

</div>

I am not exactly sure what you are looking for. Could you provide an example on what you would like to achieve? UTF-8 is the default character encoding for XML and mvdXML is XML

For the case that you need some encoding, there is this:  
UNICODE\_ESC  
: ‘\\’ ‘u’ HEX\_DIGIT HEX\_DIGIT HEX\_DIGIT HEX\_DIGIT

---

<div class="post-metadata">

**Author:** ![Noemi](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@Noemi](https://forums.buildingsmart.org/u/Noemi)\
**Post date:** [July 17, 2020, 1:20pm UTC](https://forums.buildingsmart.org/t/mvdxml-rule-grammar-and-utf-8/2442/3 "2020-07-17T13:20:16Z")

</div>

I’m talking about lexer and parser rules for the string (f.e.) in template rule, provided by the buildingSmart mvdXML documentation. Just in case you want to write a parser for the string part in mvdXML.  
You are right mvd is xml format but the string gets its extra grammar, doesn’t it?  
So I’m just asking why not using utf-8 in general, just a question out of curiosity.

---

<div class="post-metadata">

**Author:** ![sergej](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sergej](https://forums.buildingsmart.org/u/sergej)\
**Post date:** [July 22, 2020, 11:32am UTC](https://forums.buildingsmart.org/t/mvdxml-rule-grammar-and-utf-8/2442/4 "2020-07-22T11:32:15Z")

</div>

As I suggested with the snippet for UNICODE\_ESC. You can find it in the lexer rules. In my opinion, this is not necessary (due to UTF-8 in XML), but it is available if you would like to encode any special characters.
