panosl / django-currencies

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.
http://pypi.python.org/pypi/django-currencies
BSD 3-Clause "New" or "Revised" License
94 stars 81 forks source link

Special currency symbols cause warning #17

Closed kskumar closed 5 years ago

kskumar commented 9 years ago

When trying to add a new currency from the admin console, the inclusion of a special character (I'm assuming it's unicode) causes a warning to occur.

Specifically, I was trying to add the Indian Rupee with the following values:

The exact text of the error is as follows: Warning at /admin/currencies/currency/add/ Incorrect string value: '\xE2\x82\xB9' for column 'symbol' at row 1

The problem also occurs for the following symbols:

The problem does not occur for the following symbols:

Environment:

panosl commented 9 years ago

I'll look into it probably over the weekend, but can you tell me if you're using MySQL? I found a Django issue here: https://code.djangoproject.com/ticket/13919 will have to look further though, if it's a one time thing or if they are related (the table/row not being utf-8).

kskumar commented 9 years ago

@panosl Yes, I am using MySQL. Exact version is 5.5.40. After changing the column's character set and collation as described in comment 3 on that Django issue, this issue disappears.

panosl commented 9 years ago

not sure if I should leave this open for future reference. The django issue is also open.