Text artifacts left in "hello" demo
Summary
Some form of text corruption artefact on the the "hello" demo.
Steps to reproduce
What are the steps we should take to reproduce the bug:
- Running Windows 10
- Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 23:18:50) [MSC v.1900 64 bit (AMD64)] :: Anaconda, Inc. on win32
- run "streamlit hello"
- In the "choose a demo" drop down the default page is called 'â€"' and the title is 'Welcome to Streamlit! 👋'
Expected behavior:
Non corrupted text
Actual behavior:
In the "choose a demo" drop down the default page is called 'â€"' and the title is 'Welcome to Streamlit! 👋'
Is this a regression?
no
Debug info
- Streamlit version: (get it with
$ streamlit version) = Streamlit, version 0.47.3 - Python version: (get it with
$ python --version) = Python 3.7.3 - Using Conda? PipEnv? PyEnv? Pex? = Conda
- OS version: Microsoft Windows 10 Pro (Version 10.0.18362 Build 18362)
- Browser version: Google Chrome 77.0.3865.90 (Official Build) (64-bit)

Hi LiamMW
I just noticed this the other day too, when testing on a Windows VM.
This looks like a Python Unicode issue. We'll have to do some research to find the right solution here, but it would be great if someone with more Windows experience could chip in.
I have seen those weird symbols before. I think its because its often the case in Windows that the default encoding is latin-1 instead of UTF-8.
Not sure if we want to include new dependencies, but I see there are a few issues relating to encoding.
A bit of a brute force approach to solving those issues that has worked well in the past, if you have a broad user base is called; ftfy (fix text for you). Perhaps this could be handy for streamlit?
https://github.com/LuminosoInsight/python-ftfy
Oh, that's an interesting Python module. As you say, we should be judicious about adding dependencies, so let's see if we can solve this without that. But that's a good candidate in case we have no recourse :+1:
Can someone try this on Windows? (As luck would have it, my Windows machine just broke...)
st.write('Using unescaped unicode: 👍')st.write('Using escaped unicode: \U0001F44D')st.write(u'Using unescaped unicode and explicit unicode literal: 👍')st.write(u'Using escaped unicode and explicit unicode literal: \U0001F44D')
Do any of these print correctly?
(If no response after I'm done triaging all pending issues, I'll download and run a Windows VM to try this out myself)
I'll give it a test later today and let you know.
Hi @tvst , I use windows machine and is getting similar output on running the demo. These are the outputs I got
st.write('Using unescaped unicode: 👍')
Script execution error(popup window) - 'charmap' codec can't decode byte 0x8d in position 65: character maps to
st.write('Using escaped unicode: \U0001F44D')
Using escaped unicode: 👍
st.write(u'Using unescaped unicode and explicit unicode literal: 👍')
Script execution error(popup window) - 'charmap' codec can't decode byte 0x8d in position 95: character maps to
st.write(u'Using escaped unicode and explicit unicode literal: \U0001F44D')
Using escaped unicode and explicit unicode literal: 👍
Using Python 3.7 on Windows 10 with streamlit 0.58.0
I did not see the following behavior in any version of python on Windows:
Script execution error(popup window) - 'charmap' codec can't decode byte 0x8d in position 95: character maps to
The > looking character needs to be fixed by enabling Unicode in Windows.