2 **********************************************************************
3 * Copyright (c) 2002-2005, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
7 * Created: October 30 2002
9 **********************************************************************
12 #include "unicode/uchar.h"
13 #include "unicode/udata.h"
23 * Get the next non-ignorable ASCII character from a property name
25 * @return ((advance count for the name)<<8)|character
28 getASCIIPropertyNameChar(const char *name
) {
32 /* Ignore delimiters '-', '_', and ASCII White_Space */
34 (c
=name
[i
++])==0x2d || c
==0x5f ||
35 c
==0x20 || (0x09<=c
&& c
<=0x0d);
39 return (i
<<8)|(uint8_t)uprv_asciitolower((char)c
);
46 * Get the next non-ignorable EBCDIC character from a property name
48 * @return ((advance count for the name)<<8)|character
51 getEBCDICPropertyNameChar(const char *name
) {
55 /* Ignore delimiters '-', '_', and EBCDIC White_Space */
57 (c
=name
[i
++])==0x60 || c
==0x6d ||
58 c
==0x40 || c
==0x05 || c
==0x15 || c
==0x25 || c
==0x0b || c
==0x0c || c
==0x0d;
62 return (i
<<8)|(uint8_t)uprv_ebcdictolower((char)c
);
69 * Unicode property names and property value names are compared "loosely".
71 * UCD.html 4.0.1 says:
72 * For all property names, property value names, and for property values for
73 * Enumerated, Binary, or Catalog properties, use the following
74 * loose matching rule:
76 * LM3. Ignore case, whitespace, underscore ('_'), and hyphens.
78 * This function does just that, for (char *) name strings.
79 * It is almost identical to ucnv_compareNames() but also ignores
80 * C0 White_Space characters (U+0009..U+000d, and U+0085 on EBCDIC).
85 U_CAPI
int32_t U_EXPORT2
86 uprv_compareASCIIPropertyNames(const char *name1
, const char *name2
) {
90 r1
=getASCIIPropertyNameChar(name1
);
91 r2
=getASCIIPropertyNameChar(name2
);
93 /* If we reach the ends of both strings then they match */
94 if(((r1
|r2
)&0xff)==0) {
98 /* Compare the lowercased characters */
100 rc
=(r1
&0xff)-(r2
&0xff);
111 U_CAPI
int32_t U_EXPORT2
112 uprv_compareEBCDICPropertyNames(const char *name1
, const char *name2
) {
116 r1
=getEBCDICPropertyNameChar(name1
);
117 r2
=getEBCDICPropertyNameChar(name2
);
119 /* If we reach the ends of both strings then they match */
120 if(((r1
|r2
)&0xff)==0) {
124 /* Compare the lowercased characters */
126 rc
=(r1
&0xff)-(r2
&0xff);
141 //----------------------------------------------------------------------
142 // PropertyAliases implementation
145 PropertyAliases::chooseNameInGroup(Offset offset
,
146 UPropertyNameChoice choice
) const {
148 if (!offset
|| c
< 0) {
151 const Offset
* p
= (const Offset
*) getPointer(offset
);
153 if (*p
++ < 0) return NULL
;
157 return (const char*) getPointerNull(a
);
161 PropertyAliases::getValueMap(EnumValue prop
) const {
162 NonContiguousEnumToOffset
* e2o
= (NonContiguousEnumToOffset
*) getPointer(enumToValue_offset
);
163 Offset a
= e2o
->getOffset(prop
);
164 return (const ValueMap
*) (a
? getPointerNull(a
) : NULL
);
168 PropertyAliases::getPropertyName(EnumValue prop
,
169 UPropertyNameChoice choice
) const {
170 NonContiguousEnumToOffset
* e2n
= (NonContiguousEnumToOffset
*) getPointer(enumToName_offset
);
171 return chooseNameInGroup(e2n
->getOffset(prop
), choice
);
175 PropertyAliases::getPropertyEnum(const char* alias
) const {
176 NameToEnum
* n2e
= (NameToEnum
*) getPointer(nameToEnum_offset
);
177 return n2e
->getEnum(alias
, *this);
181 PropertyAliases::getPropertyValueName(EnumValue prop
,
183 UPropertyNameChoice choice
) const {
184 const ValueMap
* vm
= getValueMap(prop
);
185 if (!vm
) return NULL
;
187 if (vm
->enumToName_offset
) {
188 a
= ((EnumToOffset
*) getPointer(vm
->enumToName_offset
))->
191 a
= ((NonContiguousEnumToOffset
*) getPointer(vm
->ncEnumToName_offset
))->
194 return chooseNameInGroup(a
, choice
);
198 PropertyAliases::getPropertyValueEnum(EnumValue prop
,
199 const char* alias
) const {
200 const ValueMap
* vm
= getValueMap(prop
);
201 if (!vm
) return UCHAR_INVALID_CODE
;
202 NameToEnum
* n2e
= (NameToEnum
*) getPointer(vm
->nameToEnum_offset
);
203 return n2e
->getEnum(alias
, *this);
208 //----------------------------------------------------------------------
209 // UDataMemory structures
211 static const PropertyAliases
* PNAME
= NULL
;
212 static UDataMemory
* UDATA
= NULL
;
214 //----------------------------------------------------------------------
215 // UDataMemory loading/unloading
218 * udata callback to verify the zone data.
221 static UBool U_CALLCONV
222 isPNameAcceptable(void* /*context*/,
223 const char* /*type*/, const char* /*name*/,
224 const UDataInfo
* info
) {
226 info
->size
>= sizeof(UDataInfo
) &&
227 info
->isBigEndian
== U_IS_BIG_ENDIAN
&&
228 info
->charsetFamily
== U_CHARSET_FAMILY
&&
229 info
->dataFormat
[0] == PNAME_SIG_0
&&
230 info
->dataFormat
[1] == PNAME_SIG_1
&&
231 info
->dataFormat
[2] == PNAME_SIG_2
&&
232 info
->dataFormat
[3] == PNAME_SIG_3
&&
233 info
->formatVersion
[0] == PNAME_FORMAT_VERSION
;
236 static UBool U_CALLCONV
pname_cleanup(void) {
247 * Load the property names data. Caller should check that data is
248 * not loaded BEFORE calling this function. Returns TRUE if the load
251 static UBool
_load() {
252 UErrorCode ec
= U_ZERO_ERROR
;
254 udata_openChoice(0, PNAME_DATA_TYPE
, PNAME_DATA_NAME
,
255 isPNameAcceptable
, 0, &ec
);
260 PNAME
= (const PropertyAliases
*) udata_getMemory(UDATA
);
261 ucln_common_registerCleanup(UCLN_COMMON_PNAME
, pname_cleanup
);
273 * Inline function that expands to code that does a lazy load of the
274 * property names data. If the data is already loaded, avoids an
275 * unnecessary function call. If the data is not loaded, call _load()
276 * to load it, and return TRUE if the load succeeds.
278 static inline UBool
load() {
280 UMTX_CHECK(NULL
, (PNAME
!=NULL
), f
);
284 //----------------------------------------------------------------------
285 // Public API implementation
287 // The C API is just a thin wrapper. Each function obtains a pointer
288 // to the singleton PropertyAliases, and calls the appropriate method
289 // on it. If it cannot obtain a pointer, because valid data is not
290 // available, then it returns NULL or UCHAR_INVALID_CODE.
292 U_CAPI
const char* U_EXPORT2
293 u_getPropertyName(UProperty property
,
294 UPropertyNameChoice nameChoice
) {
295 return load() ? PNAME
->getPropertyName(property
, nameChoice
)
299 U_CAPI UProperty U_EXPORT2
300 u_getPropertyEnum(const char* alias
) {
301 UProperty p
= load() ? (UProperty
) PNAME
->getPropertyEnum(alias
)
302 : UCHAR_INVALID_CODE
;
306 U_CAPI
const char* U_EXPORT2
307 u_getPropertyValueName(UProperty property
,
309 UPropertyNameChoice nameChoice
) {
310 return load() ? PNAME
->getPropertyValueName(property
, value
, nameChoice
)
314 U_CAPI
int32_t U_EXPORT2
315 u_getPropertyValueEnum(UProperty property
,
317 return load() ? PNAME
->getPropertyValueEnum(property
, alias
)
318 : (int32_t)UCHAR_INVALID_CODE
;
321 /* data swapping ------------------------------------------------------------ */
324 * Sub-structure-swappers use the temp array (which is as large as the
325 * actual data) for intermediate storage,
326 * as well as to indicate if a particular structure has been swapped already.
327 * The temp array is initially reset to all 0.
328 * pos is the byte offset of the sub-structure in the inBytes/outBytes/temp arrays.
332 EnumToOffset::swap(const UDataSwapper
*ds
,
333 const uint8_t *inBytes
, int32_t length
, uint8_t *outBytes
,
334 uint8_t *temp
, int32_t pos
,
335 UErrorCode
*pErrorCode
) {
336 const EnumToOffset
*inMap
;
337 EnumToOffset
*outMap
, *tempMap
;
340 tempMap
=(EnumToOffset
*)(temp
+pos
);
341 if(tempMap
->enumStart
!=0 || tempMap
->enumLimit
!=0) {
342 /* this map was swapped already */
343 size
=tempMap
->getSize();
347 inMap
=(const EnumToOffset
*)(inBytes
+pos
);
348 outMap
=(EnumToOffset
*)(outBytes
+pos
);
350 tempMap
->enumStart
=udata_readInt32(ds
, inMap
->enumStart
);
351 tempMap
->enumLimit
=udata_readInt32(ds
, inMap
->enumLimit
);
352 size
=tempMap
->getSize();
355 if(length
<(pos
+size
)) {
356 if(length
<(int32_t)sizeof(PropertyAliases
)) {
357 udata_printError(ds
, "upname_swap(EnumToOffset): too few bytes (%d after header)\n"
358 " for pnames.icu EnumToOffset{%d..%d} at %d\n",
359 length
, tempMap
->enumStart
, tempMap
->enumLimit
, pos
);
360 *pErrorCode
=U_INDEX_OUTOFBOUNDS_ERROR
;
365 /* swap enumStart and enumLimit */
366 ds
->swapArray32(ds
, inMap
, 2*sizeof(EnumValue
), outMap
, pErrorCode
);
368 /* swap _offsetArray[] */
369 ds
->swapArray16(ds
, inMap
->getOffsetArray(), (tempMap
->enumLimit
-tempMap
->enumStart
)*sizeof(Offset
),
370 outMap
->getOffsetArray(), pErrorCode
);
377 NonContiguousEnumToOffset::swap(const UDataSwapper
*ds
,
378 const uint8_t *inBytes
, int32_t length
, uint8_t *outBytes
,
379 uint8_t *temp
, int32_t pos
,
380 UErrorCode
*pErrorCode
) {
381 const NonContiguousEnumToOffset
*inMap
;
382 NonContiguousEnumToOffset
*outMap
, *tempMap
;
385 tempMap
=(NonContiguousEnumToOffset
*)(temp
+pos
);
386 if(tempMap
->count
!=0) {
387 /* this map was swapped already */
388 size
=tempMap
->getSize();
392 inMap
=(const NonContiguousEnumToOffset
*)(inBytes
+pos
);
393 outMap
=(NonContiguousEnumToOffset
*)(outBytes
+pos
);
395 tempMap
->count
=udata_readInt32(ds
, inMap
->count
);
396 size
=tempMap
->getSize();
399 if(length
<(pos
+size
)) {
400 if(length
<(int32_t)sizeof(PropertyAliases
)) {
401 udata_printError(ds
, "upname_swap(NonContiguousEnumToOffset): too few bytes (%d after header)\n"
402 " for pnames.icu NonContiguousEnumToOffset[%d] at %d\n",
403 length
, tempMap
->count
, pos
);
404 *pErrorCode
=U_INDEX_OUTOFBOUNDS_ERROR
;
409 /* swap count and _enumArray[] */
410 length
=(1+tempMap
->count
)*sizeof(EnumValue
);
411 ds
->swapArray32(ds
, inMap
, length
,
414 /* swap _offsetArray[] */
416 ds
->swapArray16(ds
, inBytes
+pos
, tempMap
->count
*sizeof(Offset
),
417 outBytes
+pos
, pErrorCode
);
423 struct NameAndIndex
{
428 typedef int32_t U_CALLCONV
PropNameCompareFn(const char *name1
, const char *name2
);
430 struct CompareContext
{
432 PropNameCompareFn
*propCompare
;
435 static int32_t U_CALLCONV
436 upname_compareRows(const void *context
, const void *left
, const void *right
) {
437 CompareContext
*cmp
=(CompareContext
*)context
;
438 return cmp
->propCompare(cmp
->chars
+((const NameAndIndex
*)left
)->name
,
439 cmp
->chars
+((const NameAndIndex
*)right
)->name
);
444 NameToEnum::swap(const UDataSwapper
*ds
,
445 const uint8_t *inBytes
, int32_t length
, uint8_t *outBytes
,
446 uint8_t *temp
, int32_t pos
,
447 UErrorCode
*pErrorCode
) {
448 const NameToEnum
*inMap
;
449 NameToEnum
*outMap
, *tempMap
;
451 const EnumValue
*inEnumArray
;
452 EnumValue
*outEnumArray
;
454 const Offset
*inNameArray
;
455 Offset
*outNameArray
;
457 NameAndIndex
*sortArray
;
460 int32_t i
, size
, oldIndex
;
462 tempMap
=(NameToEnum
*)(temp
+pos
);
463 if(tempMap
->count
!=0) {
464 /* this map was swapped already */
465 size
=tempMap
->getSize();
469 inMap
=(const NameToEnum
*)(inBytes
+pos
);
470 outMap
=(NameToEnum
*)(outBytes
+pos
);
472 tempMap
->count
=udata_readInt32(ds
, inMap
->count
);
473 size
=tempMap
->getSize();
476 if(length
<(pos
+size
)) {
477 if(length
<(int32_t)sizeof(PropertyAliases
)) {
478 udata_printError(ds
, "upname_swap(NameToEnum): too few bytes (%d after header)\n"
479 " for pnames.icu NameToEnum[%d] at %d\n",
480 length
, tempMap
->count
, pos
);
481 *pErrorCode
=U_INDEX_OUTOFBOUNDS_ERROR
;
487 ds
->swapArray32(ds
, inMap
, 4, outMap
, pErrorCode
);
489 inEnumArray
=inMap
->getEnumArray();
490 outEnumArray
=outMap
->getEnumArray();
492 inNameArray
=(const Offset
*)(inEnumArray
+tempMap
->count
);
493 outNameArray
=(Offset
*)(outEnumArray
+tempMap
->count
);
495 if(ds
->inCharset
==ds
->outCharset
) {
496 /* no need to sort, just swap the enum/name arrays */
497 ds
->swapArray32(ds
, inEnumArray
, tempMap
->count
*4, outEnumArray
, pErrorCode
);
498 ds
->swapArray16(ds
, inNameArray
, tempMap
->count
*2, outNameArray
, pErrorCode
);
503 * The name and enum arrays are sorted by names and must be resorted
504 * if inCharset!=outCharset.
505 * We use the corresponding part of the temp array to sort an array
506 * of pairs of name offsets and sorting indexes.
507 * Then the sorting indexes are used to permutate-swap the name and enum arrays.
509 * The outBytes must already contain the swapped strings.
511 sortArray
=(NameAndIndex
*)tempMap
->getEnumArray();
512 for(i
=0; i
<tempMap
->count
; ++i
) {
513 sortArray
[i
].name
=udata_readInt16(ds
, inNameArray
[i
]);
514 sortArray
[i
].index
=(Offset
)i
;
518 * use a stable sort to avoid shuffling of equal strings,
519 * which makes testing harder
521 cmp
.chars
=(const char *)outBytes
;
522 if (ds
->outCharset
==U_ASCII_FAMILY
) {
523 cmp
.propCompare
=uprv_compareASCIIPropertyNames
;
526 cmp
.propCompare
=uprv_compareEBCDICPropertyNames
;
528 uprv_sortArray(sortArray
, tempMap
->count
, sizeof(NameAndIndex
),
529 upname_compareRows
, &cmp
,
531 if(U_FAILURE(*pErrorCode
)) {
532 udata_printError(ds
, "upname_swap(NameToEnum).uprv_sortArray(%d items) failed\n",
537 /* copy/swap/permutate _enumArray[] and _nameArray[] */
538 if(inEnumArray
!=outEnumArray
) {
539 for(i
=0; i
<tempMap
->count
; ++i
) {
540 oldIndex
=sortArray
[i
].index
;
541 ds
->swapArray32(ds
, inEnumArray
+oldIndex
, 4, outEnumArray
+i
, pErrorCode
);
542 ds
->swapArray16(ds
, inNameArray
+oldIndex
, 2, outNameArray
+i
, pErrorCode
);
546 * in-place swapping: need to permutate into a temporary array
547 * and then copy back to not destroy the data
549 EnumValue
*tempEnumArray
;
552 /* write name offsets directly from sortArray */
553 for(i
=0; i
<tempMap
->count
; ++i
) {
554 ds
->writeUInt16((uint16_t *)outNameArray
+i
, (uint16_t)sortArray
[i
].name
);
558 * compress the oldIndexes into a separate array to make space for tempEnumArray
559 * the tempMap _nameArray becomes oldIndexes[], getting the index
560 * values from the 2D sortArray[],
561 * while sortArray=tempMap _enumArray[] becomes tempEnumArray[]
562 * this saves us allocating more memory
564 * it works because sizeof(NameAndIndex)<=sizeof(EnumValue)
565 * and because the nameArray[] can be used for oldIndexes[]
567 tempEnumArray
=(EnumValue
*)sortArray
;
568 oldIndexes
=(Offset
*)(sortArray
+tempMap
->count
);
570 /* copy sortArray[].index values into oldIndexes[] */
571 for(i
=0; i
<tempMap
->count
; ++i
) {
572 oldIndexes
[i
]=sortArray
[i
].index
;
575 /* permutate inEnumArray[] into tempEnumArray[] */
576 for(i
=0; i
<tempMap
->count
; ++i
) {
577 ds
->swapArray32(ds
, inEnumArray
+oldIndexes
[i
], 4, tempEnumArray
+i
, pErrorCode
);
580 /* copy tempEnumArray[] to outEnumArray[] */
581 uprv_memcpy(outEnumArray
, tempEnumArray
, tempMap
->count
*4);
589 PropertyAliases::swap(const UDataSwapper
*ds
,
590 const uint8_t *inBytes
, int32_t length
, uint8_t *outBytes
,
591 UErrorCode
*pErrorCode
) {
592 const PropertyAliases
*inAliases
;
593 PropertyAliases
*outAliases
;
594 PropertyAliases aliases
;
596 const ValueMap
*inValueMaps
;
597 ValueMap
*outValueMaps
;
604 inAliases
=(const PropertyAliases
*)inBytes
;
605 outAliases
=(PropertyAliases
*)outBytes
;
607 /* read the input PropertyAliases - all 16-bit values */
608 for(i
=0; i
<(int32_t)sizeof(PropertyAliases
)/2; ++i
) {
609 ((uint16_t *)&aliases
)[i
]=ds
->readUInt16(((const uint16_t *)inBytes
)[i
]);
613 if(length
<aliases
.total_size
) {
614 udata_printError(ds
, "upname_swap(): too few bytes (%d after header) for all of pnames.icu\n",
616 *pErrorCode
=U_INDEX_OUTOFBOUNDS_ERROR
;
620 /* copy the data for inaccessible bytes */
621 if(inBytes
!=outBytes
) {
622 uprv_memcpy(outBytes
, inBytes
, aliases
.total_size
);
625 /* swap the PropertyAliases class fields */
626 ds
->swapArray16(ds
, inAliases
, sizeof(PropertyAliases
), outAliases
, pErrorCode
);
628 /* swap the name groups */
629 ds
->swapArray16(ds
, inBytes
+aliases
.nameGroupPool_offset
,
630 aliases
.stringPool_offset
-aliases
.nameGroupPool_offset
,
631 outBytes
+aliases
.nameGroupPool_offset
, pErrorCode
);
633 /* swap the strings */
634 udata_swapInvStringBlock(ds
, inBytes
+aliases
.stringPool_offset
,
635 aliases
.total_size
-aliases
.stringPool_offset
,
636 outBytes
+aliases
.stringPool_offset
, pErrorCode
);
639 * alloc uint8_t temp[total_size] and reset it
640 * swap each top-level struct, put at least the count fields into temp
641 * use subclass-specific swap() functions
642 * enumerate value maps, for each
643 * if temp does not have count!=0 yet
644 * read count, put it into temp
646 * resort strings in name->enum maps
649 temp
=(uint8_t *)uprv_malloc(aliases
.total_size
);
651 udata_printError(ds
, "upname_swap(): unable to allocate temp memory (%d bytes)\n",
653 *pErrorCode
=U_MEMORY_ALLOCATION_ERROR
;
656 uprv_memset(temp
, 0, aliases
.total_size
);
658 /* swap properties->name groups map */
659 NonContiguousEnumToOffset::swap(ds
, inBytes
, length
, outBytes
,
660 temp
, aliases
.enumToName_offset
, pErrorCode
);
662 /* swap name->properties map */
663 NameToEnum::swap(ds
, inBytes
, length
, outBytes
,
664 temp
, aliases
.nameToEnum_offset
, pErrorCode
);
666 /* swap properties->value maps map */
667 NonContiguousEnumToOffset::swap(ds
, inBytes
, length
, outBytes
,
668 temp
, aliases
.enumToValue_offset
, pErrorCode
);
670 /* enumerate all ValueMaps and swap them */
671 inValueMaps
=(const ValueMap
*)(inBytes
+aliases
.valueMap_offset
);
672 outValueMaps
=(ValueMap
*)(outBytes
+aliases
.valueMap_offset
);
674 for(i
=0; i
<aliases
.valueMap_count
; ++i
) {
675 valueMap
.enumToName_offset
=udata_readInt16(ds
, inValueMaps
[i
].enumToName_offset
);
676 valueMap
.ncEnumToName_offset
=udata_readInt16(ds
, inValueMaps
[i
].ncEnumToName_offset
);
677 valueMap
.nameToEnum_offset
=udata_readInt16(ds
, inValueMaps
[i
].nameToEnum_offset
);
679 if(valueMap
.enumToName_offset
!=0) {
680 EnumToOffset::swap(ds
, inBytes
, length
, outBytes
,
681 temp
, valueMap
.enumToName_offset
,
683 } else if(valueMap
.ncEnumToName_offset
!=0) {
684 NonContiguousEnumToOffset::swap(ds
, inBytes
, length
, outBytes
,
685 temp
, valueMap
.ncEnumToName_offset
,
688 if(valueMap
.nameToEnum_offset
!=0) {
689 NameToEnum::swap(ds
, inBytes
, length
, outBytes
,
690 temp
, valueMap
.nameToEnum_offset
,
695 /* swap the ValueMaps array itself */
696 ds
->swapArray16(ds
, inValueMaps
, aliases
.valueMap_count
*sizeof(ValueMap
),
697 outValueMaps
, pErrorCode
);
699 /* name groups and strings were swapped above */
705 return aliases
.total_size
;
708 U_CAPI
int32_t U_EXPORT2
709 upname_swap(const UDataSwapper
*ds
,
710 const void *inData
, int32_t length
, void *outData
,
711 UErrorCode
*pErrorCode
) {
712 const UDataInfo
*pInfo
;
715 const uint8_t *inBytes
;
718 /* udata_swapDataHeader checks the arguments */
719 headerSize
=udata_swapDataHeader(ds
, inData
, length
, outData
, pErrorCode
);
720 if(pErrorCode
==NULL
|| U_FAILURE(*pErrorCode
)) {
724 /* check data format and format version */
725 pInfo
=(const UDataInfo
*)((const char *)inData
+4);
727 pInfo
->dataFormat
[0]==0x70 && /* dataFormat="pnam" */
728 pInfo
->dataFormat
[1]==0x6e &&
729 pInfo
->dataFormat
[2]==0x61 &&
730 pInfo
->dataFormat
[3]==0x6d &&
731 pInfo
->formatVersion
[0]==1
733 udata_printError(ds
, "upname_swap(): data format %02x.%02x.%02x.%02x (format version %02x) is not recognized as pnames.icu\n",
734 pInfo
->dataFormat
[0], pInfo
->dataFormat
[1],
735 pInfo
->dataFormat
[2], pInfo
->dataFormat
[3],
736 pInfo
->formatVersion
[0]);
737 *pErrorCode
=U_UNSUPPORTED_ERROR
;
741 inBytes
=(const uint8_t *)inData
+headerSize
;
742 outBytes
=(uint8_t *)outData
+headerSize
;
746 if(length
<(int32_t)sizeof(PropertyAliases
)) {
747 udata_printError(ds
, "upname_swap(): too few bytes (%d after header) for pnames.icu\n",
749 *pErrorCode
=U_INDEX_OUTOFBOUNDS_ERROR
;
754 return headerSize
+PropertyAliases::swap(ds
, inBytes
, length
, outBytes
, pErrorCode
);