Skip to content

unicode literals not work  #1025

@yanganto

Description

@yanganto

Feature

In Python source code, specific Unicode code points can be written using the \u escape sequence, which is followed by four hex digits giving the code point. The \U escape sequence is similar but expects eight hex digits, not four.

cpython

Python 3.7.3 (default, Mar 26 2019, 21:43:19)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> "\u0037"
'7'
>>> "\xac"
'¬'

RustPython

Welcome to the magnificent Rust Python 0.0.1 interpreter 😱 🖖
>>>>> "\u0037"
'\\u0037'
>>>>> "\xac"
'\\xac'

Python Documentation

https://docs.python.org/3/howto/unicode.html#unicode-literals-in-python-source-code

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-compatA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions