Task #5407 (closed)
Opened 8 years ago
Closed 8 years ago
BUG: unicode -> utf-8 in Web
| Reported by: | wmoore | Owned by: | atarkowska |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-Beta4.3 |
| Component: | Web | Version: | n.a. |
| Keywords: | n.a. | Cc: | jamoore |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | 2011-06-02 (13) |
Description
Need to handle strange characters in all web input forms.
See:
http://www.saltycrane.com/blog/2008/11/python-unicodeencodeerror-ascii-codec-cant-encode-character/
To reproduce, you can copy a chinese character from the link above and paste it into Comment field etc.
Originally reported as #5404 (German input) in web mobile. Fixed with a single commit, since web-mobile doesn't use Django forms here.
Change History (5)
comment:1 Changed 8 years ago by atarkowska
- Sprint set to 2011-06-02 (13)
- Status changed from new to accepted
comment:2 Changed 8 years ago by Aleksandra Tarkowska <aleksandrat@…>
- Remaining Time set to 0
- Resolution set to fixed
- Status changed from accepted to closed
comment:3 Changed 8 years ago by atarkowska
comment:4 Changed 8 years ago by atarkowska
- Resolution fixed deleted
- Status changed from closed to reopened
+ python dist/bin/omero web unittest --config=<http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/./component=web,label=linux/729/artifact/src/trunk.config> --test=webadmin ..E........... ====================================================================== ERROR: test_changePassword (omeroweb.webadmin.tests.unittests.WebAdminTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "<http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/./component=web,label=linux/ws/src/dist/lib/python/omeroweb/webadmin/tests/unittests.py",> line 690, in test_changePassword _changePassword(request, conn, eid) File "<http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/./component=web,label=linux/ws/src/dist/lib/python/omeroweb/webadmin/tests/unittests.py",> line 709, in _changePassword if password_form.is_valid(): File "<http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/./component=web,label=linux/ws/src/dist/lib/python/django/forms/forms.py",> line 120, in is_valid return self.is_bound and not bool(self.errors) File "<http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/./component=web,label=linux/ws/src/dist/lib/python/django/forms/forms.py",> line 111, in _get_errors self.full_clean() File "<http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/./component=web,label=linux/ws/src/dist/lib/python/omeroweb/custom_forms.py",> line 12, in full_clean for name, field in self.cleaned_data.items(): AttributeError: 'ChangePassword' object has no attribute 'cleaned_data'
comment:5 Changed 8 years ago by atarkowska
- Resolution set to fixed
- Status changed from reopened to closed
(In [fd0cd26a43cab0adad3c1e381a14edbd8327bb66/ome.git] on branch develop) this fixes cleaned_data issue #5407
(In [0a409acbf65db68cba2300e2594a560f14ccbf9d/ome.git] on branch develop) this fixes non ascii UnicodeEncodeError? close #5407