Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - FrozenTux

Pages: [1]
1
Python / sf.Text adding a symbol before text
« on: May 22, 2015, 11:19:06 pm »
Hello,

I have used pySFML on python 2.7 for some time, and having recently switched to 3.4, I have started my first SFML python 3 project.

I have discovered that sfml.graphics.Text adds '\ufeff' before it's text, which then shows up as a square when rendered, as you can see on this image : http://monosnap.com/file/JBBAqDPIvQcHs9EzLTxwE1SyjQ8xZG.png .

This is not linked to the font itself or the rendering as the supplementary symbol is present in the string attribute of the Text object. Setting the text after initialisation does not fix the issue as the prefix is added again.

I have tried to pass utf-8 bytes instead of str, but it causes an error and the text is not set.

I am using :

As I never encountered this problem before, I have tried to run my program under Python 2.7 with the latest official binary, and the square did not appear (with or without using unicode)

This led me to think that the problem may be caused by my unofficial binary. I have tried to build from source with SFML 2.3, but unfortunately I am stuck at the last step with the error "unresolved external".
I have put the libs and includes in the correct folders with the compiler, and I have copied the dlls to the indicated location in the python folder, without success.
Maybe it's very simple to fix but I am not familiar with compilation and thus completely lost.

I would like to know if anyone encountered this issue and found a way to fix it.

Pages: [1]
anything