From 29372c323a35ea62e33a0d0a2e9746875009f867 Mon Sep 17 00:00:00 2001 From: Rob L Date: Mon, 4 Mar 2024 18:47:53 -0500 Subject: [PATCH] added UTF-8 encoding to the Jinja2 template example I followed this example and got nonsense characters instead of negative signs because I failed to specify UTF-8 encoding, as discussed in https://github.com/plotly/plotly.py/issues/4118 --- doc/python/interactive-html-export.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/python/interactive-html-export.md b/doc/python/interactive-html-export.md index 013c87c286b..461afe7f548 100644 --- a/doc/python/interactive-html-export.md +++ b/doc/python/interactive-html-export.md @@ -64,6 +64,11 @@ You can insert Plotly output and text related to your data into HTML templates u ``` <!DOCTYPE html> <html> +<head> +<meta charset="utf-8" /> <!--It is necessary to use the UTF-8 encoding with plotly graphics to get e.g. negative signs to render correctly --> +<meta name="viewport" content="width=device-width, initial-scale=1.0" /> +</head> + <body> <h1>Here's a Plotly graph!</h1> {{ fig }}