12 Commits

Author SHA1 Message Date
rdb
51f5124048 dtoolutil: consistently use char32_t for Unicode code points
Unlike wchar_t, char32_t is guaranteed to be able to hold a UTF-32 character.
2018-10-15 22:23:45 +02:00
Sam Edwards
602ea6ebf4 general: Fix a couple more compiler warnings
- express: Fix a warning when compiling for debug

- dtoolutil: Give TextEncoder a virtual destructor
2018-10-13 16:14:34 -06:00
rdb
29b577971f dtoolutil: improve Unicode encoding/decoding, support non-BMP chars
- Support encoding and decoding four-byte UTF-8 sequences
- E_unicode supports surrogate pairs, renamed to E_utf16be for clarity
- char32_t should be used for storing a Unicode code point
2018-10-08 22:33:54 +02:00
rdb
9061fd9416 dtoolutil: fix TextEncoder methods for Python 3
The no-arguments get_text() and set_text() will now return Unicode strings in Python 3, but passing in an encoding will make them return/take bytes objects.

In Python 2, they all take regular strings, but Unicode is also accepted by the no-argument get_text() and set_text().

In the future we probably want to remove most of this interface for Python users, to whom all this is unnecessary since it duplicates functionality already in the standard library.
2018-10-08 22:14:51 +02:00
Sam Edwards
7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards
ad5b45811d dtoolutil: Change export macros to EXP*_DTOOL_DTOOLUTIL
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
rdb
d1c34c3360 interrogate: support static properties 2017-08-07 22:04:56 +02:00
tobspr
0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb
18ad6d1543 Replace many int params with size_t params where appropriate, and work towards fixing type conversion warnings 2015-10-07 18:58:26 +02:00
rdb
56f7c3edf2 fix for Android compile 2013-01-07 12:45:59 +00:00
David Rose
1acf84fcfe build errors 2011-08-30 05:09:49 +00:00
David Rose
6ecf2fed29 preparing for unicode filenames 2011-08-29 04:33:00 +00:00