Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non unicode characters #44

Open
MrPetru opened this issue Feb 17, 2012 · 1 comment
Open

non unicode characters #44

MrPetru opened this issue Feb 17, 2012 · 1 comment

Comments

@MrPetru
Copy link
Collaborator

MrPetru commented Feb 17, 2012

spam don't handle the non unicode character
for example when a user insert a symbol like "à, ò, è, é, ù, ì" in asset comment the spam give an error like: ordinal non in range(128) and all asset for that categories are not visualized.

@MrPetru
Copy link
Collaborator Author

MrPetru commented Feb 19, 2012

How you can see here https://github.com/MrPetru/spam/blob/master/spam/model/misc.py#L191
the type of "text" is UnicodeString and, in this place https://github.com/MrPetru/spam/blob/master/spam/controllers/asset/main.py#L173 the comment is passed to text property without decode it to unicode.

maybe we should use this:
text = '[%s v000]\n%s' % (('created'), comment or '').decode('utf-8')
in place of this:
text = '[%s v000]\n%s' % (
('created'), comment or '')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant