[pypy-dev] Print unicode strings in RPython?

Ryan Gonzalez rymg19 at gmail.com
Mon Nov 25 23:51:18 CET 2013


Hello,

I'm writing an app in RPython. Whenever I try and print a unicode string,
the compiled application will crash with a UnicodeEncodingError. Here is an
example:

def entry_point(argv):
    print u'\u2502'
    return 0

def target(driver, args):
    return entry_point, None

When running it, I get this:

RPython traceback:
  File "implement.c", line 164, in entry_point
  File "rpython_rtyper_lltypesystem_rstr.c", line 190, in
ll_str__UnicodeR_Ptr_GcStruct_rpy_unic_rpy_unico
Fatal RPython error: UnicodeEncodeError
Aborted (core dumped)

Am I missing something? The app runs fine under CPython.

-- 
Ryan
When your hammer is C++, everything begins to look like a thumb.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20131125/f3d69d94/attachment.html>


More information about the pypy-dev mailing list