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
How to remove the valid character from the name #42
Comments
I am getting following error because of that invalid characters. ERRORUnicodeEncodeError: 'ascii' codec can't encode character u'\u0101' in position 4: ordinal not in range(128) Example (Name of regions)[u'Andaman and Nicobar Islands', u'Andhra Pradesh', u'Arun\u0101chal Pradesh', u'Assam', u'Bengal', u'Bih\u0101r', u'Chand\u012bgarh', u'Chhattisgarh', u'D\u0101dra and Nagar Haveli', u'Daman and Diu', u'Goa', u'Gujar\u0101t', u'Haryana', u'Himachal Pradesh', u'Jharkhand', u'Karn\u0101taka', u'Kashmir', u'Kerala', u'Laccadives', u'Madhya Pradesh', u'Mah\u0101r\u0101shtra', u'Manipur', u'Megh\u0101laya', u'Mizoram', u'N\u0101g\u0101land', u'NCT', u'Orissa', u'Pondicherry', u'Punjab', u'Rajasthan', u'Sikkim', u'Tamil N\u0101du', u'Tripura', u'Uttar Pradesh', u'Uttarakhand'] |
I don't need these accented chars in the name. How to remove that ? |
Hi, could you paste the full traceback ? Also, could you check if you have a site.py file in your python environment ? |
It works for me here:
Maybe there's a conflicting |
Why one "-" symbol on top of "a". I don't want that. I don't want to show that to user. |
Maybe you could fork django-cities-light and remove all unicode support instead of fixing your environment ? |
Please, provide full traceback. At the moment, I suppose this error is being thrown by database or something like this. "Why one "-" symbol on top of "a"" Ok, you don't want that, but that is the right way to write that. If you want the non-accented names, try to use name_ascii property.
|
No feedback |
I think my solution would work though. |
Another solution would be to convert to ascii in city_items_pre_import. |
Good job! 2014-04-06 11:13 GMT-03:00 James Pic notifications@github.com:
Mauricio de Abreu Antunes Github: https://github.com/mauricioabreu |
Thanks, and thanks for sharing a bit of your time to provide user support ;) On Sun, Apr 6, 2014 at 4:31 PM, Mauricio de Abreu Antunes <
http://yourlabs.org http://blog.yourlabs.org |
No problem! We are here to help. 2014-04-06 14:24 GMT-03:00 James Pic notifications@github.com:
Mauricio de Abreu Antunes Github: https://github.com/mauricioabreu |
On top of Country, region and state name, I can see some invalid character like -.
How to remove that invalid character "-"
Example
Arunāchal Pradesh
Bihār
Chandīgarh
Karnātaka
Mahārāshtra
The text was updated successfully, but these errors were encountered: