Closed GoogleCodeExporter closed 8 years ago
Take a look at this video explaining of why "Unicode is poison to
python performance":
http://www.youtube.com/watch?v=oK3EQH5Wdqo&feature=youtu.be&t=24m26s
Don't stick unicode everywhere.
Original comment by czarek.t...@gmail.com
on 4 Jun 2013 at 5:53
Strings returned from javascript and strings passed to javascript
should probably be always utf-8 and for these conversions the
ApplicationSettings.string_encoding should not be used (not 100%
sure about that, need to test it).
Original comment by czarek.t...@gmail.com
on 5 Jun 2013 at 6:52
Starting with next commit all the encoding/decoding of strings
will be kept in one file string_utils.pyx, this will make it
easier to make the unicode the default strings, but still you
have to check all the calls to CefToPyString(), CharToPyString(),
VoidPtrToStr() to check to what type the string is assigned to,
what is the context of this operation, whether unicode won't
break anything.
The documentation on the wiki pages needs to be updated, "str"
types need to be replaced with "unicode".
That's not all, there are other fixed strings in the code, if
we decide to use unicode then we must stick to it and all the
strings passed to python should be unicode, this is going to
be a bit of a nightmare, we would be forced to use u"" syntax
(in Py3 such syntax is disallowed, but in Cython it is allowed,
so it is a bit easier to write portable code for both Py2/Py3),
but what if we pass normal byte string instead in Py2? Then this
is going to be a hell in user code, as concatenating bytes
string with unicode string will throw a TypeError "can't concat
bytes to str".
Original comment by czarek.t...@gmail.com
on 5 Jun 2013 at 7:12
More thoughts on making unicode default in Py27 here:
https://groups.google.com/d/msg/cython-users/VICzhVn-zPw/B0U4_AK36UkJ
Original comment by czarek.t...@gmail.com
on 9 Jan 2014 at 7:36
Marking as Won't Fix. Use Python 3 if you need unified unicode strings. Fixing
this would break backwards compatibility.
Original comment by czarek.t...@gmail.com
on 10 Aug 2014 at 6:03
Project will move to Github. Find this issue at the new address (soon):
https://github.com/cztomczak/cefpython/issues/60
Original comment by czarek.t...@gmail.com
on 24 Aug 2015 at 6:30
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 4 Jun 2013 at 2:10