[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Re: BUG: import font fails with python2.3 cvs 1.7.2pre 2006/01/13
I tried changing PyUnicode_AsEncodedObject to PyUnicode_AsEncodedString.
I think it works... but haven't really tested it fully. I think this
should be ok.
If someone is using unicode fonts, that can test pygame cvs please do!
Also a little example that tests unicode fonts would be very handy.
Chairs,
On 1/13/06, Rene Dudfield <renesd@xxxxxxxxx> wrote:
> $ python
> Python 2.3.5 (#2, Jun 19 2005, 13:28:00)
> [GCC 3.3.6 (Debian 1:3.3.6-6)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pygame.font
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: /usr/lib/python2.3/site-packages/pygame/font.so:
> undefined symbol: PyUnicode_AsEncodedObject
>
> This has to do with the recent unicode change to font.c
>
> ----------------------------
> revision 1.55
> date: 2005-12-08 17:21:05 +0000; author: pygame; state: Exp; lines: +6 -4
> When rendering unicode, use the python c function to convert
> unicode to UTF8. Previously used a "CallMethod" on the unicode object.
> ----------------------------
>
>
>
> Looks like it is to do with the use of PyUnicode_AsEncodedObject which
> is only in python 2.4 not python2.3 or earlier.
>
> Maybe PyUnicode_AsEncodedString could be used instead? That is
> available in python2.3, and python2.2.
>