Giter VIP home page Giter VIP logo

Comments (3)

youknowone avatar youknowone commented on May 26, 2024

RustPython (almost) only support utf-8 and ascii. Would you check if your source code is a correct utf-8 file? If you keep having the problem, please upload the source code file too. It will be really helpful.

Welcome to the magnificent Rust Python 0.3.0 interpreter 😱 🖖
RustPython 3.12.0
Type "help", "copyright", "credits" or "license" for more information.
>>>>> print("测试中文")
测试中文
>>>>> 
❯ ./target/debug/rustpython test_utf8_zh.py
测试中文

from rustpython.

xiaoxstz avatar xiaoxstz commented on May 26, 2024

My Environment

  • OS:Windows 10 pro 22H2
  • How to install RustPython
# Install rust
scoop install main/rust
# Install the latest RustPython
cargo install --git https://github.com/RustPython/RustPython

File encoding

I have ensured the encoding of the Python script file is utf8

Encoding-vscode

Other related issue

I have also found the issue in the interactive panel

D:\Desktop                                                             
λ RustPython                                                           
Welcome to the magnificent Rust Python 0.3.0 interpreter � �           
RustPython 3.12.0                                                      
Type "help", "copyright", "credits" or "license" for more information. 
>>>>> print("测试中文")                                                    
娴嬭瘯涓枃                                                                 
>>>>>                                                                  

from rustpython.

youknowone avatar youknowone commented on May 26, 2024

Could you upload your test.py file here? You can drag-and-drop the zipped source code to the comment box.

from rustpython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.