Re: POST JSON vs. urlencoded
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Apr 02, 2019 at 11:52:01PM +0000, Joseph Myers wrote: > On Tue, 2 Apr 2019, Ralf Schlatterbeck wrote: > > > At least in python2 roundup's database interface wants UTF-8 for all > > strings. Can someone chime in and tell me if this has changed with > > python3? I don't want to change this now and break py3 compatibility. > > The general rule is as described in roundup/anypy/strings.py: > > # Roundup represents text internally using the native Python str type. > # In Python 3, these are Unicode strings. In Python 2, these are > # encoded using UTF-8, and the Python 2 unicode type is only used in a > # few places, generally for interacting with external modules > # requiring that type to be used. Thanks Joseph, that was exactly what I was looking for, I remembered something like this when you worked on the py3 compatibility. The code in the REST API now works for me with python2 (with the modified patch from John) and I suppose John will test again with Py3. We should have tests that do an end-to-end test with various encodings of the REST API... Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: http://www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]