Skip to content

Stream did not contain valid UTF-8 #282

@Iced0368

Description

@Iced0368

Describe the bug
When characters such as Chinese characters and Hangul are initially rendered, they are converted into invalid characters and entered in index.js. Therefore, a stream did not contain valid UTF-8 error occurs.

For example:

def index():
    return pc.container(
        pc.text("한글")
    )

app = pc.App()
app.add_page(index)
app.compile()

this code makes an error

class State(pc.State):
    text = "한글"

def index():
    return pc.container(
        pc.text(State.text)
    )

app = pc.App(state=State)
app.add_page(index)
app.compile()

but this works.
This obviously looks like a bug.

Screenshots
invalid

index.js when the first code was compiled

** Specifics (please complete the following information):**

  • Python Version: 3.10.xx
  • Pynecone Version: 0.1.12
  • OS: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAnything you want improved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions