[x264-devel] Windows Unicode support

Henrik Gramner git at videolan.org
Fri Aug 23 23:06:33 CEST 2013


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Sun Aug 11 19:50:42 2013 +0200| [a1d3d17239e94a82ab261a071384295406bd8587] | committer: Jason Garrett-Glaser

Windows Unicode support

Windows, unlike most other operating systems, uses UTF-16 for Unicode strings while x264 is designed for UTF-8.

This patch does the following in order to handle things like Unicode filenames:
* Keep strings internally as UTF-8.
* Retrieve the CLI command line as UTF-16 and convert it to UTF-8.
* Always use Unicode versions of Windows API functions and convert strings to UTF-16 when calling them.
* Attempt to use legacy 8.3 short filenames for external libraries without Unicode support.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=a1d3d17239e94a82ab261a071384295406bd8587
---

 common/common.c         |    4 +-
 common/opencl.c         |   12 ++---
 common/osdep.c          |   69 +++++++++++++++++++++++-
 common/osdep.h          |   33 ++++++++----
 common/win32thread.c    |    4 +-
 common/win32thread.h    |    1 -
 configure               |    6 ++-
 encoder/encoder.c       |    4 +-
 encoder/ratecontrol.c   |   10 ++--
 input/avs.c             |   13 ++++-
 input/ffms.c            |   33 ++++++++----
 input/raw.c             |    2 +-
 input/timecode.c        |    2 +-
 input/y4m.c             |    2 +-
 output/flv_bytestream.c |    2 +-
 output/matroska_ebml.c  |    2 +-
 output/mp4.c            |   10 +++-
 output/raw.c            |    2 +-
 x264.c                  |  135 ++++++++++++++++++++++++++++++++++++++---------
 x264.h                  |   12 ++---
 x264cli.h               |    7 +++
 x264res.rc              |    6 +--
 22 files changed, 287 insertions(+), 84 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/x264.git/?a=commitdiff;h=a1d3d17239e94a82ab261a071384295406bd8587


More information about the x264-devel mailing list