WL#4616: Implement UTF-16LE

Affects: Server-5.6   —   Status: Complete

As of version 5.5, MySQL supports only UTF16 (i.e. big-endian) character set.
This task is about adding UTF-16LE (i.e. little endian).

Rationale
=========
- We need UTF16-LE as a prerequisite for 
  "WL#4616 Support Unicode for Windows command line client",
  as Windows console API functions are all UTF16-LE.

- Sun Globalization rules require us to support UTF-16LE

- UTF16-LE can be useful for other Unicode applications,
  especially on Windows

Jeff Balint (connectors) wrote:
>We are currently doing character set conversions in the driver
>(character_set_results=null). We convert it to UTF8, and have our own
>code to convert it to UTF16. If UTF-16LE support is added to the server
>and driver, it should improve performance for apps using many/large
>unicode strings.

Johannes Schlüter wrote:
>PHP 6, which will, probably, be release in 1.5 - 2 years, will use
>Utf-16 internally. In the current development tree of the PHP connectors
>we're converting to UTF-8. So from that side it'd be nice to save that
>conversion.
>...
>PHP 6's Unicode implementation is based on IBM's ICU library which uses
>system dependent endianess. So being able to pass through Utf-16 BE and
>LE would, again, save the conversion on our side.

Peter Laursen (Basic Quality Contributor) writes in BUG#52494:
> Server side support for UTF16 (LE) would be
> very nice and would solve quite a lot of problems/issues for Windows
> users working in a multi-lingual environment.