StdLib: Add multi-byte character support. The normal "narrow" character set is now UTF-8 instead of ASCII.

Add library classes which are required by StdLib, but not commonly defined in Platform DSC files, to StdLib.inc.
Modify MB_LEN_MAX to be 4, the maximum length of UTF-8 characters.
Adjust size of internal buffers to be multiples of MB_LEN_MAX instead of assuming 1-byte characters.
Make the XYoffset object public and move its declaration into EfiSysCall.h.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: erik.c.bjorge@intel.com
Reviewed-by: lee.g.rosenbaum@intel.com
Reviewed-by: leroy.p.leahy@intel.com


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13457 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
darylm503
2012-06-15 19:58:39 +00:00
parent c7907ba2fa
commit a7a8363d86
15 changed files with 1023 additions and 99 deletions

View File

@@ -8,7 +8,7 @@
type as would an expression that is an object of the corresponding type
converted according to the integer promotions.
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -28,7 +28,7 @@
/* Define the values required by the ISO/IEC 9899 Specification. */
/** Maximum number of bytes in a multibyte character, for any supported locale. **/
#define MB_LEN_MAX 2 /* 16-bit UTC-2 */
#define MB_LEN_MAX 4 /* UTF-8 can require up to 4 bytes */
/** Number of bits comprising the smallest object that is not a bit-field (byte). **/
#define CHAR_BIT __CHAR_BIT