Closed traceon closed 4 years ago
well, few questins:
driver/utils/conversion_std.h (MSVC only)
Why not conversion_msvc.h
?
conversions are performed via pivot encoding
What is pivot encoding here? Do I get it right, that you usually convert via some intermediate encoding? If yes, why?
Why not conversion_msvc.h ?
Because it can be still used with any other compiler, with one single macro switch.
What is pivot encoding here? Do I get it right, that you usually convert via some intermediate encoding? If yes, why?
ICU's converter-of-X only converts from X to its pivot, and from its pivot to X. ICU uses a hardcoded pivot, which is UTF-16 in UChar. Changing it to UTF-8 may speed up things in our case, but will require custom built ICU. This is planned for the next change. Everything inside the driver is represented in UTF-8.
utils/amortized_istream_reader.h
utils/resize_without_initialization.h
utils/object_pool.h
utils/string_pool.h
utils/conversion_context.h
utils/unicode_converter.h
utils/unicode_conv.h
into:driver/utils/conversion.h
(common code)driver/utils/conversion_std.h
(default for MSVC)driver/utils/conversion_icu.h
(default for all non-MSVC, not implemented for MSVC)utils/unicode_converter.h
, conversions are performed via pivot encoding, with some possible shortcuts, (hardcoded in ICU, UTF-16 placed in UChar arrays), main directions: application narrow-char <--(ICU pivot)--> driver internal narrow char application wide-char <--(ICU pivot)--> driver internal narrow char data source narrow-char <--(ICU pivot)--> driver internal narrow char