mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
70.25k stars 6.25k forks source link

Entity Relation Chart do not support non-ascii character #1478

Closed peter-jerry-ye closed 6 months ago

peter-jerry-ye commented 4 years ago

Describe the bug Entity Relation Chart do not support non-ascii character

To Reproduce Steps to reproduce the behavior:

  1. Go to Mermid live editor
  2. Click on 'ER Diagram'
  3. Replace any of 'CUSTOMER' or 'DELIVERY-ADDRESS' or 'has' by a non-ascii word, like '顾客', 'à'
  4. See error

Expected behavior No syntax error

Screenshots image

Desktop (please complete the following information):

sidharthv96 commented 11 months ago

We could add support to labels like we have in class and flow diagrams. Double quoted strings will support unicode.

aloisklink commented 6 months ago

I believe this is a duplicate of #3171, and it's already been fixed as part of https://github.com/mermaid-js/mermaid/pull/3516.

However, attribute types/names still don't support non-ascii characters. However, attribute comments do, see below:

```mermaid
erDiagram
    "🌋 volcano" ||--o{ "Hiking Trail 🥾" : "contains 🧭"
    "🌋 volcano" {
        string name "name: 名"
        float height "my 📈"
        string sector
    }

renders as

```mermaid
erDiagram
    "🌋 volcano" ||--o{ "Hiking Trail 🥾" : "contains 🧭"
    "🌋 volcano" {
        string name "name: 名"
        float height "my 📈"
        string sector
    }