Add NDK APIs needed by skia

Add the following API groups from ICU4C into NDK.
- ubidi
- ubrk
- uenum
- uldn
- unorm2
- uscript
- utext

The list of newly added APIs can be found in libicu.map.txt
or libicu_export.txt in the CL. libicu_export.txt also lists
why some functions in the API groups are not exposed in NDK now.

Verified that, except utext and uenum, the APIs has an equivalent
public API exposed from ICU4J in android.icu package.
utext and uenum are kinds of iterators used by the other APIs.
The mutation APIs in utext are not exposed now until a clear use
cases, e.g. reduced memory usage, is found.

The original utext.h supports allocating a UText object from stack, but
it's explicitly disabled by hiding the definition of UText struct
from the utext.h to avoid ABI compat issue in the future.

Bug: 160350521
Bug: 174051744
Test: `m droid` with building skia on top of libicu
Test: atest CtsIcu4cTestCases
Change-Id: I924958061fdf48e4b4b669506c6524d1cf7986c1
diff --git a/libicu/cts_headers/unicode/urename.h b/libicu/cts_headers/unicode/urename.h
index a68944c..9d1aac1 100644
--- a/libicu/cts_headers/unicode/urename.h
+++ b/libicu/cts_headers/unicode/urename.h
@@ -423,86 +423,86 @@
 #define u_vsscanf_u U_ICU_ENTRY_POINT_RENAME(u_vsscanf_u)
 #define u_writeIdenticalLevelRun U_ICU_ENTRY_POINT_RENAME(u_writeIdenticalLevelRun)
 #define ubidi_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ubidi_addPropertyStarts)
-#define ubidi_close U_ICU_ENTRY_POINT_RENAME(ubidi_close)
-#define ubidi_countParagraphs U_ICU_ENTRY_POINT_RENAME(ubidi_countParagraphs)
-#define ubidi_countRuns U_ICU_ENTRY_POINT_RENAME(ubidi_countRuns)
-#define ubidi_getBaseDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getBaseDirection)
+// #define ubidi_close U_ICU_ENTRY_POINT_RENAME(ubidi_close)
+// #define ubidi_countParagraphs U_ICU_ENTRY_POINT_RENAME(ubidi_countParagraphs)
+// #define ubidi_countRuns U_ICU_ENTRY_POINT_RENAME(ubidi_countRuns)
+// #define ubidi_getBaseDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getBaseDirection)
 #define ubidi_getClass U_ICU_ENTRY_POINT_RENAME(ubidi_getClass)
-#define ubidi_getClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_getClassCallback)
-#define ubidi_getCustomizedClass U_ICU_ENTRY_POINT_RENAME(ubidi_getCustomizedClass)
-#define ubidi_getDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getDirection)
+// #define ubidi_getClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_getClassCallback)
+// #define ubidi_getCustomizedClass U_ICU_ENTRY_POINT_RENAME(ubidi_getCustomizedClass)
+// #define ubidi_getDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getDirection)
 #define ubidi_getJoiningGroup U_ICU_ENTRY_POINT_RENAME(ubidi_getJoiningGroup)
 #define ubidi_getJoiningType U_ICU_ENTRY_POINT_RENAME(ubidi_getJoiningType)
-#define ubidi_getLength U_ICU_ENTRY_POINT_RENAME(ubidi_getLength)
-#define ubidi_getLevelAt U_ICU_ENTRY_POINT_RENAME(ubidi_getLevelAt)
-#define ubidi_getLevels U_ICU_ENTRY_POINT_RENAME(ubidi_getLevels)
-#define ubidi_getLogicalIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalIndex)
-#define ubidi_getLogicalMap U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalMap)
-#define ubidi_getLogicalRun U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalRun)
+// #define ubidi_getLength U_ICU_ENTRY_POINT_RENAME(ubidi_getLength)
+// #define ubidi_getLevelAt U_ICU_ENTRY_POINT_RENAME(ubidi_getLevelAt)
+// #define ubidi_getLevels U_ICU_ENTRY_POINT_RENAME(ubidi_getLevels)
+// #define ubidi_getLogicalIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalIndex)
+// #define ubidi_getLogicalMap U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalMap)
+// #define ubidi_getLogicalRun U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalRun)
 #define ubidi_getMaxValue U_ICU_ENTRY_POINT_RENAME(ubidi_getMaxValue)
 #define ubidi_getMemory U_ICU_ENTRY_POINT_RENAME(ubidi_getMemory)
 #define ubidi_getMirror U_ICU_ENTRY_POINT_RENAME(ubidi_getMirror)
 #define ubidi_getPairedBracket U_ICU_ENTRY_POINT_RENAME(ubidi_getPairedBracket)
 #define ubidi_getPairedBracketType U_ICU_ENTRY_POINT_RENAME(ubidi_getPairedBracketType)
-#define ubidi_getParaLevel U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevel)
+// #define ubidi_getParaLevel U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevel)
 #define ubidi_getParaLevelAtIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevelAtIndex)
-#define ubidi_getParagraph U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraph)
-#define ubidi_getParagraphByIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraphByIndex)
-#define ubidi_getProcessedLength U_ICU_ENTRY_POINT_RENAME(ubidi_getProcessedLength)
-#define ubidi_getReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingMode)
-#define ubidi_getReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingOptions)
-#define ubidi_getResultLength U_ICU_ENTRY_POINT_RENAME(ubidi_getResultLength)
+// #define ubidi_getParagraph U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraph)
+// #define ubidi_getParagraphByIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraphByIndex)
+// #define ubidi_getProcessedLength U_ICU_ENTRY_POINT_RENAME(ubidi_getProcessedLength)
+// #define ubidi_getReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingMode)
+// #define ubidi_getReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingOptions)
+// #define ubidi_getResultLength U_ICU_ENTRY_POINT_RENAME(ubidi_getResultLength)
 #define ubidi_getRuns U_ICU_ENTRY_POINT_RENAME(ubidi_getRuns)
-#define ubidi_getText U_ICU_ENTRY_POINT_RENAME(ubidi_getText)
-#define ubidi_getVisualIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualIndex)
-#define ubidi_getVisualMap U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualMap)
-#define ubidi_getVisualRun U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualRun)
-#define ubidi_invertMap U_ICU_ENTRY_POINT_RENAME(ubidi_invertMap)
+// #define ubidi_getText U_ICU_ENTRY_POINT_RENAME(ubidi_getText)
+// #define ubidi_getVisualIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualIndex)
+// #define ubidi_getVisualMap U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualMap)
+// #define ubidi_getVisualRun U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualRun)
+// #define ubidi_invertMap U_ICU_ENTRY_POINT_RENAME(ubidi_invertMap)
 #define ubidi_isBidiControl U_ICU_ENTRY_POINT_RENAME(ubidi_isBidiControl)
-#define ubidi_isInverse U_ICU_ENTRY_POINT_RENAME(ubidi_isInverse)
+// #define ubidi_isInverse U_ICU_ENTRY_POINT_RENAME(ubidi_isInverse)
 #define ubidi_isJoinControl U_ICU_ENTRY_POINT_RENAME(ubidi_isJoinControl)
 #define ubidi_isMirrored U_ICU_ENTRY_POINT_RENAME(ubidi_isMirrored)
-#define ubidi_isOrderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_isOrderParagraphsLTR)
-#define ubidi_open U_ICU_ENTRY_POINT_RENAME(ubidi_open)
-#define ubidi_openSized U_ICU_ENTRY_POINT_RENAME(ubidi_openSized)
-#define ubidi_orderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_orderParagraphsLTR)
-#define ubidi_reorderLogical U_ICU_ENTRY_POINT_RENAME(ubidi_reorderLogical)
-#define ubidi_reorderVisual U_ICU_ENTRY_POINT_RENAME(ubidi_reorderVisual)
-#define ubidi_setClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_setClassCallback)
-#define ubidi_setContext U_ICU_ENTRY_POINT_RENAME(ubidi_setContext)
-#define ubidi_setInverse U_ICU_ENTRY_POINT_RENAME(ubidi_setInverse)
-#define ubidi_setLine U_ICU_ENTRY_POINT_RENAME(ubidi_setLine)
-#define ubidi_setPara U_ICU_ENTRY_POINT_RENAME(ubidi_setPara)
-#define ubidi_setReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingMode)
-#define ubidi_setReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingOptions)
-#define ubidi_writeReordered U_ICU_ENTRY_POINT_RENAME(ubidi_writeReordered)
-#define ubidi_writeReverse U_ICU_ENTRY_POINT_RENAME(ubidi_writeReverse)
+// #define ubidi_isOrderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_isOrderParagraphsLTR)
+// #define ubidi_open U_ICU_ENTRY_POINT_RENAME(ubidi_open)
+// #define ubidi_openSized U_ICU_ENTRY_POINT_RENAME(ubidi_openSized)
+// #define ubidi_orderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_orderParagraphsLTR)
+// #define ubidi_reorderLogical U_ICU_ENTRY_POINT_RENAME(ubidi_reorderLogical)
+// #define ubidi_reorderVisual U_ICU_ENTRY_POINT_RENAME(ubidi_reorderVisual)
+// #define ubidi_setClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_setClassCallback)
+// #define ubidi_setContext U_ICU_ENTRY_POINT_RENAME(ubidi_setContext)
+// #define ubidi_setInverse U_ICU_ENTRY_POINT_RENAME(ubidi_setInverse)
+// #define ubidi_setLine U_ICU_ENTRY_POINT_RENAME(ubidi_setLine)
+// #define ubidi_setPara U_ICU_ENTRY_POINT_RENAME(ubidi_setPara)
+// #define ubidi_setReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingMode)
+// #define ubidi_setReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingOptions)
+// #define ubidi_writeReordered U_ICU_ENTRY_POINT_RENAME(ubidi_writeReordered)
+// #define ubidi_writeReverse U_ICU_ENTRY_POINT_RENAME(ubidi_writeReverse)
 #define ubiditransform_close U_ICU_ENTRY_POINT_RENAME(ubiditransform_close)
 #define ubiditransform_open U_ICU_ENTRY_POINT_RENAME(ubiditransform_open)
 #define ubiditransform_transform U_ICU_ENTRY_POINT_RENAME(ubiditransform_transform)
 #define ublock_getCode U_ICU_ENTRY_POINT_RENAME(ublock_getCode)
-#define ubrk_close U_ICU_ENTRY_POINT_RENAME(ubrk_close)
-#define ubrk_countAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_countAvailable)
-#define ubrk_current U_ICU_ENTRY_POINT_RENAME(ubrk_current)
-#define ubrk_first U_ICU_ENTRY_POINT_RENAME(ubrk_first)
-#define ubrk_following U_ICU_ENTRY_POINT_RENAME(ubrk_following)
-#define ubrk_getAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_getAvailable)
+// #define ubrk_close U_ICU_ENTRY_POINT_RENAME(ubrk_close)
+// #define ubrk_countAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_countAvailable)
+// #define ubrk_current U_ICU_ENTRY_POINT_RENAME(ubrk_current)
+// #define ubrk_first U_ICU_ENTRY_POINT_RENAME(ubrk_first)
+// #define ubrk_following U_ICU_ENTRY_POINT_RENAME(ubrk_following)
+// #define ubrk_getAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_getAvailable)
 #define ubrk_getBinaryRules U_ICU_ENTRY_POINT_RENAME(ubrk_getBinaryRules)
 #define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType)
-#define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus)
-#define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVec)
-#define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary)
-#define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last)
-#define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next)
-#define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open)
+// #define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus)
+// #define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVec)
+// #define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary)
+// #define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last)
+// #define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next)
+// #define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open)
 #define ubrk_openBinaryRules U_ICU_ENTRY_POINT_RENAME(ubrk_openBinaryRules)
 #define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules)
-#define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding)
-#define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous)
+// #define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding)
+// #define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous)
 #define ubrk_refreshUText U_ICU_ENTRY_POINT_RENAME(ubrk_refreshUText)
 #define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone)
-#define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText)
-#define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText)
+// #define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText)
+// #define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText)
 #define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap)
 #define ucache_compareKeys U_ICU_ENTRY_POINT_RENAME(ucache_compareKeys)
 #define ucache_deleteKey U_ICU_ENTRY_POINT_RENAME(ucache_deleteKey)
@@ -917,15 +917,15 @@
 #define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open)
 #define udtitvfmt_openResult U_ICU_ENTRY_POINT_RENAME(udtitvfmt_openResult)
 #define udtitvfmt_resultAsValue U_ICU_ENTRY_POINT_RENAME(udtitvfmt_resultAsValue)
-#define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close)
-#define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count)
-#define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next)
+// #define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close)
+// #define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count)
+// #define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next)
 #define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault)
-#define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openCharStringsEnumeration)
+// #define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openCharStringsEnumeration)
 #define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openFromStringEnumeration)
-#define uenum_openUCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openUCharStringsEnumeration)
-#define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset)
-#define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext)
+// #define uenum_openUCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openUCharStringsEnumeration)
+// #define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset)
+// #define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext)
 #define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault)
 #define ufieldpositer_close U_ICU_ENTRY_POINT_RENAME(ufieldpositer_close)
 #define ufieldpositer_next U_ICU_ENTRY_POINT_RENAME(ufieldpositer_next)
@@ -1020,20 +1020,20 @@
 #define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString)
 #define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE)
 #define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8)
-#define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close)
-#define uldn_getContext U_ICU_ENTRY_POINT_RENAME(uldn_getContext)
-#define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHandling)
-#define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale)
-#define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName)
-#define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisplayName)
-#define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisplayName)
-#define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayName)
-#define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open)
-#define uldn_openForContext U_ICU_ENTRY_POINT_RENAME(uldn_openForContext)
-#define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayName)
-#define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCodeDisplayName)
-#define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayName)
-#define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDisplayName)
+// #define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close)
+// #define uldn_getContext U_ICU_ENTRY_POINT_RENAME(uldn_getContext)
+// #define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHandling)
+// #define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale)
+// #define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName)
+// #define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisplayName)
+// #define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisplayName)
+// #define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayName)
+// #define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open)
+// #define uldn_openForContext U_ICU_ENTRY_POINT_RENAME(uldn_openForContext)
+// #define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayName)
+// #define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCodeDisplayName)
+// #define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayName)
+// #define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDisplayName)
 #define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginList)
 #define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList)
 #define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_close_keyword_values_iterator)
@@ -1162,27 +1162,27 @@
 #define umutablecptrie_set U_ICU_ENTRY_POINT_RENAME(umutablecptrie_set)
 #define umutablecptrie_setRange U_ICU_ENTRY_POINT_RENAME(umutablecptrie_setRange)
 #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnicode32Instance)
-#define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append)
-#define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close)
-#define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair)
-#define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombiningClass)
-#define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecomposition)
+// #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append)
+// #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close)
+// #define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair)
+// #define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombiningClass)
+// #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecomposition)
 #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance)
-#define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstance)
-#define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstance)
-#define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCCasefoldInstance)
-#define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInstance)
-#define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInstance)
-#define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDecomposition)
-#define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter)
-#define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryBefore)
-#define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert)
-#define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized)
-#define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize)
-#define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_normalizeSecondAndAppend)
+// #define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstance)
+// #define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstance)
+// #define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCCasefoldInstance)
+// #define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInstance)
+// #define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInstance)
+// #define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDecomposition)
+// #define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter)
+// #define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryBefore)
+// #define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert)
+// #define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized)
+// #define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize)
+// #define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_normalizeSecondAndAppend)
 #define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered)
-#define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck)
-#define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickCheckYes)
+// #define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck)
+// #define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickCheckYes)
 #define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap)
 #define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare)
 #define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate)
@@ -1583,19 +1583,19 @@
 #define ures_openU U_ICU_ENTRY_POINT_RENAME(ures_openU)
 #define ures_resetIterator U_ICU_ENTRY_POINT_RENAME(ures_resetIterator)
 #define ures_swap U_ICU_ENTRY_POINT_RENAME(ures_swap)
-#define uscript_breaksBetweenLetters U_ICU_ENTRY_POINT_RENAME(uscript_breaksBetweenLetters)
+// #define uscript_breaksBetweenLetters U_ICU_ENTRY_POINT_RENAME(uscript_breaksBetweenLetters)
 #define uscript_closeRun U_ICU_ENTRY_POINT_RENAME(uscript_closeRun)
-#define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode)
-#define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName)
-#define uscript_getSampleString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleString)
+// #define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode)
+// #define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName)
+// #define uscript_getSampleString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleString)
 #define uscript_getSampleUnicodeString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleUnicodeString)
-#define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript)
-#define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScriptExtensions)
-#define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName)
-#define uscript_getUsage U_ICU_ENTRY_POINT_RENAME(uscript_getUsage)
-#define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript)
-#define uscript_isCased U_ICU_ENTRY_POINT_RENAME(uscript_isCased)
-#define uscript_isRightToLeft U_ICU_ENTRY_POINT_RENAME(uscript_isRightToLeft)
+// #define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript)
+// #define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScriptExtensions)
+// #define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName)
+// #define uscript_getUsage U_ICU_ENTRY_POINT_RENAME(uscript_getUsage)
+// #define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript)
+// #define uscript_isCased U_ICU_ENTRY_POINT_RENAME(uscript_isCased)
+// #define uscript_isRightToLeft U_ICU_ENTRY_POINT_RENAME(uscript_isRightToLeft)
 #define uscript_nextRun U_ICU_ENTRY_POINT_RENAME(uscript_nextRun)
 #define uscript_openRun U_ICU_ENTRY_POINT_RENAME(uscript_openRun)
 #define uscript_resetRun U_ICU_ENTRY_POINT_RENAME(uscript_resetRun)
@@ -1742,33 +1742,33 @@
 #define ustrcase_internalToUpper U_ICU_ENTRY_POINT_RENAME(ustrcase_internalToUpper)
 #define ustrcase_map U_ICU_ENTRY_POINT_RENAME(ustrcase_map)
 #define ustrcase_mapWithOverlap U_ICU_ENTRY_POINT_RENAME(ustrcase_mapWithOverlap)
-#define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At)
-#define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone)
-#define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close)
+// #define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At)
+// #define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone)
+// #define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close)
 #define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy)
-#define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32)
-#define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals)
-#define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract)
+// #define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32)
+// #define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals)
+// #define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract)
 #define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze)
-#define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex)
+// #define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex)
 #define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPreviousNativeIndex)
 #define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData)
 #define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpensive)
 #define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable)
-#define utext_moveIndex32 U_ICU_ENTRY_POINT_RENAME(utext_moveIndex32)
-#define utext_nativeLength U_ICU_ENTRY_POINT_RENAME(utext_nativeLength)
-#define utext_next32 U_ICU_ENTRY_POINT_RENAME(utext_next32)
-#define utext_next32From U_ICU_ENTRY_POINT_RENAME(utext_next32From)
+// #define utext_moveIndex32 U_ICU_ENTRY_POINT_RENAME(utext_moveIndex32)
+// #define utext_nativeLength U_ICU_ENTRY_POINT_RENAME(utext_nativeLength)
+// #define utext_next32 U_ICU_ENTRY_POINT_RENAME(utext_next32)
+// #define utext_next32From U_ICU_ENTRY_POINT_RENAME(utext_next32From)
 #define utext_openCharacterIterator U_ICU_ENTRY_POINT_RENAME(utext_openCharacterIterator)
 #define utext_openConstUnicodeString U_ICU_ENTRY_POINT_RENAME(utext_openConstUnicodeString)
 #define utext_openReplaceable U_ICU_ENTRY_POINT_RENAME(utext_openReplaceable)
-#define utext_openUChars U_ICU_ENTRY_POINT_RENAME(utext_openUChars)
-#define utext_openUTF8 U_ICU_ENTRY_POINT_RENAME(utext_openUTF8)
+// #define utext_openUChars U_ICU_ENTRY_POINT_RENAME(utext_openUChars)
+// #define utext_openUTF8 U_ICU_ENTRY_POINT_RENAME(utext_openUTF8)
 #define utext_openUnicodeString U_ICU_ENTRY_POINT_RENAME(utext_openUnicodeString)
-#define utext_previous32 U_ICU_ENTRY_POINT_RENAME(utext_previous32)
-#define utext_previous32From U_ICU_ENTRY_POINT_RENAME(utext_previous32From)
+// #define utext_previous32 U_ICU_ENTRY_POINT_RENAME(utext_previous32)
+// #define utext_previous32From U_ICU_ENTRY_POINT_RENAME(utext_previous32From)
 #define utext_replace U_ICU_ENTRY_POINT_RENAME(utext_replace)
-#define utext_setNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_setNativeIndex)
+// #define utext_setNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_setNativeIndex)
 #define utext_setup U_ICU_ENTRY_POINT_RENAME(utext_setup)
 #define utf8_appendCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_appendCharSafeBody)
 #define utf8_back1SafeBody U_ICU_ENTRY_POINT_RENAME(utf8_back1SafeBody)
diff --git a/libicu/libicu.map.txt b/libicu/libicu.map.txt
index 3098a69..6603317 100644
--- a/libicu/libicu.map.txt
+++ b/libicu/libicu.map.txt
@@ -124,6 +124,84 @@
     u_totitle;
     u_toupper;
     u_versionToString;
+    ubidi_close;
+    ubidi_countParagraphs;
+    ubidi_countRuns;
+    ubidi_getBaseDirection;
+    ubidi_getClassCallback;
+    ubidi_getCustomizedClass;
+    ubidi_getDirection;
+    ubidi_getLength;
+    ubidi_getLevelAt;
+    ubidi_getLevels;
+    ubidi_getLogicalIndex;
+    ubidi_getLogicalMap;
+    ubidi_getLogicalRun;
+    ubidi_getParaLevel;
+    ubidi_getParagraph;
+    ubidi_getParagraphByIndex;
+    ubidi_getProcessedLength;
+    ubidi_getReorderingMode;
+    ubidi_getReorderingOptions;
+    ubidi_getResultLength;
+    ubidi_getText;
+    ubidi_getVisualIndex;
+    ubidi_getVisualMap;
+    ubidi_getVisualRun;
+    ubidi_invertMap;
+    ubidi_isInverse;
+    ubidi_isOrderParagraphsLTR;
+    ubidi_open;
+    ubidi_openSized;
+    ubidi_orderParagraphsLTR;
+    ubidi_reorderLogical;
+    ubidi_reorderVisual;
+    ubidi_setClassCallback;
+    ubidi_setContext;
+    ubidi_setInverse;
+    ubidi_setLine;
+    ubidi_setPara;
+    ubidi_setReorderingMode;
+    ubidi_setReorderingOptions;
+    ubidi_writeReordered;
+    ubidi_writeReverse;
+    ubrk_close;
+    ubrk_countAvailable;
+    ubrk_current;
+    ubrk_first;
+    ubrk_following;
+    ubrk_getAvailable;
+    ubrk_getRuleStatus;
+    ubrk_getRuleStatusVec;
+    ubrk_isBoundary;
+    ubrk_last;
+    ubrk_next;
+    ubrk_open;
+    ubrk_preceding;
+    ubrk_previous;
+    ubrk_setText;
+    ubrk_setUText;
+    uenum_close;
+    uenum_count;
+    uenum_next;
+    uenum_openCharStringsEnumeration;
+    uenum_openUCharStringsEnumeration;
+    uenum_reset;
+    uenum_unext;
+    uldn_close;
+    uldn_getContext;
+    uldn_getDialectHandling;
+    uldn_getLocale;
+    uldn_keyDisplayName;
+    uldn_keyValueDisplayName;
+    uldn_languageDisplayName;
+    uldn_localeDisplayName;
+    uldn_open;
+    uldn_openForContext;
+    uldn_regionDisplayName;
+    uldn_scriptCodeDisplayName;
+    uldn_scriptDisplayName;
+    uldn_variantDisplayName;
     uloc_acceptLanguage;
     uloc_addLikelySubtags;
     uloc_canonicalize;
@@ -161,6 +239,52 @@
     uloc_toUnicodeLocaleKey;
     uloc_toUnicodeLocaleType;
     ulocdata_getCLDRVersion;
+    unorm2_append;
+    unorm2_close;
+    unorm2_composePair;
+    unorm2_getCombiningClass;
+    unorm2_getDecomposition;
+    unorm2_getNFCInstance;
+    unorm2_getNFDInstance;
+    unorm2_getNFKCCasefoldInstance;
+    unorm2_getNFKCInstance;
+    unorm2_getNFKDInstance;
+    unorm2_getRawDecomposition;
+    unorm2_hasBoundaryAfter;
+    unorm2_hasBoundaryBefore;
+    unorm2_isInert;
+    unorm2_isNormalized;
+    unorm2_normalize;
+    unorm2_normalizeSecondAndAppend;
+    unorm2_quickCheck;
+    unorm2_spanQuickCheckYes;
+    uscript_breaksBetweenLetters;
+    uscript_getCode;
+    uscript_getName;
+    uscript_getSampleString;
+    uscript_getScript;
+    uscript_getScriptExtensions;
+    uscript_getShortName;
+    uscript_getUsage;
+    uscript_hasScript;
+    uscript_isCased;
+    uscript_isRightToLeft;
+    utext_char32At;
+    utext_clone;
+    utext_close;
+    utext_current32;
+    utext_equals;
+    utext_extract;
+    utext_getNativeIndex;
+    utext_moveIndex32;
+    utext_nativeLength;
+    utext_next32;
+    utext_next32From;
+    utext_openUChars;
+    utext_openUTF8;
+    utext_previous32;
+    utext_previous32From;
+    utext_setNativeIndex;
   local:
     *;
 };
\ No newline at end of file
diff --git a/libicu/ndk_headers/unicode/ubidi.h b/libicu/ndk_headers/unicode/ubidi.h
new file mode 100644
index 0000000..8e22053
--- /dev/null
+++ b/libicu/ndk_headers/unicode/ubidi.h
@@ -0,0 +1,2370 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+******************************************************************************
+*
+*   Copyright (C) 1999-2013, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*   file name:  ubidi.h
+*   encoding:   UTF-8
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 1999jul27
+*   created by: Markus W. Scherer, updated by Matitiahu Allouche
+*/
+
+#ifndef UBIDI_H
+#define UBIDI_H
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif   // U_SHOW_CPLUSPLUS_API
+
+/**
+ *\file
+ * \brief C API: Bidi algorithm
+ *
+ * <h2>Bidi algorithm for ICU</h2>
+ *
+ * This is an implementation of the Unicode Bidirectional Algorithm.
+ * The algorithm is defined in the
+ * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>.<p>
+ *
+ * Note: Libraries that perform a bidirectional algorithm and
+ * reorder strings accordingly are sometimes called "Storage Layout Engines".
+ * ICU's Bidi and shaping (u_shapeArabic()) APIs can be used at the core of such
+ * "Storage Layout Engines".
+ *
+ * <h3>General remarks about the API:</h3>
+ *
+ * In functions with an error code parameter,
+ * the <code>pErrorCode</code> pointer must be valid
+ * and the value that it points to must not indicate a failure before
+ * the function call. Otherwise, the function returns immediately.
+ * After the function call, the value indicates success or failure.<p>
+ *
+ * The &quot;limit&quot; of a sequence of characters is the position just after their
+ * last character, i.e., one more than that position.<p>
+ *
+ * Some of the API functions provide access to &quot;runs&quot;.
+ * Such a &quot;run&quot; is defined as a sequence of characters
+ * that are at the same embedding level
+ * after performing the Bidi algorithm.<p>
+ *
+ * @author Markus W. Scherer
+ * @version 1.0
+ *
+ *
+ * <h4> Sample code for the ICU Bidi API </h4>
+ *
+ * <h5>Rendering a paragraph with the ICU Bidi API</h5>
+ *
+ * This is (hypothetical) sample code that illustrates
+ * how the ICU Bidi API could be used to render a paragraph of text.
+ * Rendering code depends highly on the graphics system,
+ * therefore this sample code must make a lot of assumptions,
+ * which may or may not match any existing graphics system's properties.
+ *
+ * <p>The basic assumptions are:</p>
+ * <ul>
+ * <li>Rendering is done from left to right on a horizontal line.</li>
+ * <li>A run of single-style, unidirectional text can be rendered at once.</li>
+ * <li>Such a run of text is passed to the graphics system with
+ *     characters (code units) in logical order.</li>
+ * <li>The line-breaking algorithm is very complicated
+ *     and Locale-dependent -
+ *     and therefore its implementation omitted from this sample code.</li>
+ * </ul>
+ *
+ * <pre>
+ * \code
+ *#include "unicode/ubidi.h"
+ *
+ *typedef enum {
+ *     styleNormal=0, styleSelected=1,
+ *     styleBold=2, styleItalics=4,
+ *     styleSuper=8, styleSub=16
+ *} Style;
+ *
+ *typedef struct { int32_t limit; Style style; } StyleRun;
+ *
+ *int getTextWidth(const UChar *text, int32_t start, int32_t limit,
+ *                  const StyleRun *styleRuns, int styleRunCount);
+ *
+ * // set *pLimit and *pStyleRunLimit for a line
+ * // from text[start] and from styleRuns[styleRunStart]
+ * // using ubidi_getLogicalRun(para, ...)
+ *void getLineBreak(const UChar *text, int32_t start, int32_t *pLimit,
+ *                  UBiDi *para,
+ *                  const StyleRun *styleRuns, int styleRunStart, int *pStyleRunLimit,
+ *                  int *pLineWidth);
+ *
+ * // render runs on a line sequentially, always from left to right
+ *
+ * // prepare rendering a new line
+ * void startLine(UBiDiDirection textDirection, int lineWidth);
+ *
+ * // render a run of text and advance to the right by the run width
+ * // the text[start..limit-1] is always in logical order
+ * void renderRun(const UChar *text, int32_t start, int32_t limit,
+ *               UBiDiDirection textDirection, Style style);
+ *
+ * // We could compute a cross-product
+ * // from the style runs with the directional runs
+ * // and then reorder it.
+ * // Instead, here we iterate over each run type
+ * // and render the intersections -
+ * // with shortcuts in simple (and common) cases.
+ * // renderParagraph() is the main function.
+ *
+ * // render a directional run with
+ * // (possibly) multiple style runs intersecting with it
+ * void renderDirectionalRun(const UChar *text,
+ *                           int32_t start, int32_t limit,
+ *                           UBiDiDirection direction,
+ *                           const StyleRun *styleRuns, int styleRunCount) {
+ *     int i;
+ *
+ *     // iterate over style runs
+ *     if(direction==UBIDI_LTR) {
+ *         int styleLimit;
+ *
+ *         for(i=0; i<styleRunCount; ++i) {
+ *             styleLimit=styleRun[i].limit;
+ *             if(start<styleLimit) {
+ *                 if(styleLimit>limit) { styleLimit=limit; }
+ *                 renderRun(text, start, styleLimit,
+ *                           direction, styleRun[i].style);
+ *                 if(styleLimit==limit) { break; }
+ *                 start=styleLimit;
+ *             }
+ *         }
+ *     } else {
+ *         int styleStart;
+ *
+ *         for(i=styleRunCount-1; i>=0; --i) {
+ *             if(i>0) {
+ *                 styleStart=styleRun[i-1].limit;
+ *             } else {
+ *                 styleStart=0;
+ *             }
+ *             if(limit>=styleStart) {
+ *                 if(styleStart<start) { styleStart=start; }
+ *                 renderRun(text, styleStart, limit,
+ *                           direction, styleRun[i].style);
+ *                 if(styleStart==start) { break; }
+ *                 limit=styleStart;
+ *             }
+ *         }
+ *     }
+ * }
+ *
+ * // the line object represents text[start..limit-1]
+ * void renderLine(UBiDi *line, const UChar *text,
+ *                 int32_t start, int32_t limit,
+ *                 const StyleRun *styleRuns, int styleRunCount) {
+ *     UBiDiDirection direction=ubidi_getDirection(line);
+ *     if(direction!=UBIDI_MIXED) {
+ *         // unidirectional
+ *         if(styleRunCount<=1) {
+ *             renderRun(text, start, limit, direction, styleRuns[0].style);
+ *         } else {
+ *             renderDirectionalRun(text, start, limit,
+ *                                  direction, styleRuns, styleRunCount);
+ *         }
+ *     } else {
+ *         // mixed-directional
+ *         int32_t count, i, length;
+ *         UBiDiLevel level;
+ *
+ *         count=ubidi_countRuns(para, pErrorCode);
+ *         if(U_SUCCESS(*pErrorCode)) {
+ *             if(styleRunCount<=1) {
+ *                 Style style=styleRuns[0].style;
+ *
+ *                 // iterate over directional runs
+ *                for(i=0; i<count; ++i) {
+ *                    direction=ubidi_getVisualRun(para, i, &start, &length);
+ *                     renderRun(text, start, start+length, direction, style);
+ *                }
+ *             } else {
+ *                 int32_t j;
+ *
+ *                 // iterate over both directional and style runs
+ *                 for(i=0; i<count; ++i) {
+ *                     direction=ubidi_getVisualRun(line, i, &start, &length);
+ *                     renderDirectionalRun(text, start, start+length,
+ *                                          direction, styleRuns, styleRunCount);
+ *                 }
+ *             }
+ *         }
+ *     }
+ * }
+ *
+ *void renderParagraph(const UChar *text, int32_t length,
+ *                     UBiDiDirection textDirection,
+ *                      const StyleRun *styleRuns, int styleRunCount,
+ *                      int lineWidth,
+ *                      UErrorCode *pErrorCode) {
+ *     UBiDi *para;
+ *
+ *     if(pErrorCode==NULL || U_FAILURE(*pErrorCode) || length<=0) {
+ *         return;
+ *     }
+ *
+ *     para=ubidi_openSized(length, 0, pErrorCode);
+ *     if(para==NULL) { return; }
+ *
+ *     ubidi_setPara(para, text, length,
+ *                   textDirection ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR,
+ *                   NULL, pErrorCode);
+ *     if(U_SUCCESS(*pErrorCode)) {
+ *         UBiDiLevel paraLevel=1&ubidi_getParaLevel(para);
+ *         StyleRun styleRun={ length, styleNormal };
+ *         int width;
+ *
+ *         if(styleRuns==NULL || styleRunCount<=0) {
+ *            styleRunCount=1;
+ *             styleRuns=&styleRun;
+ *         }
+ *
+ *        // assume styleRuns[styleRunCount-1].limit>=length
+ *
+ *         width=getTextWidth(text, 0, length, styleRuns, styleRunCount);
+ *         if(width<=lineWidth) {
+ *             // everything fits onto one line
+ *
+ *            // prepare rendering a new line from either left or right
+ *             startLine(paraLevel, width);
+ *
+ *             renderLine(para, text, 0, length,
+ *                        styleRuns, styleRunCount);
+ *         } else {
+ *             UBiDi *line;
+ *
+ *             // we need to render several lines
+ *             line=ubidi_openSized(length, 0, pErrorCode);
+ *             if(line!=NULL) {
+ *                 int32_t start=0, limit;
+ *                 int styleRunStart=0, styleRunLimit;
+ *
+ *                 for(;;) {
+ *                     limit=length;
+ *                     styleRunLimit=styleRunCount;
+ *                     getLineBreak(text, start, &limit, para,
+ *                                  styleRuns, styleRunStart, &styleRunLimit,
+ *                                 &width);
+ *                     ubidi_setLine(para, start, limit, line, pErrorCode);
+ *                     if(U_SUCCESS(*pErrorCode)) {
+ *                         // prepare rendering a new line
+ *                         // from either left or right
+ *                         startLine(paraLevel, width);
+ *
+ *                         renderLine(line, text, start, limit,
+ *                                    styleRuns+styleRunStart,
+ *                                    styleRunLimit-styleRunStart);
+ *                     }
+ *                     if(limit==length) { break; }
+ *                     start=limit;
+ *                     styleRunStart=styleRunLimit-1;
+ *                     if(start>=styleRuns[styleRunStart].limit) {
+ *                         ++styleRunStart;
+ *                     }
+ *                 }
+ *
+ *                 ubidi_close(line);
+ *             }
+ *        }
+ *    }
+ *
+ *     ubidi_close(para);
+ *}
+ *\endcode
+ * </pre>
+ */
+
+/*DOCXX_TAG*/
+/*@{*/
+
+/**
+ * UBiDiLevel is the type of the level values in this
+ * Bidi implementation.
+ * It holds an embedding level and indicates the visual direction
+ * by its bit&nbsp;0 (even/odd value).<p>
+ *
+ * It can also hold non-level values for the
+ * <code>paraLevel</code> and <code>embeddingLevels</code>
+ * arguments of <code>ubidi_setPara()</code>; there:
+ * <ul>
+ * <li>bit&nbsp;7 of an <code>embeddingLevels[]</code>
+ * value indicates whether the using application is
+ * specifying the level of a character to <i>override</i> whatever the
+ * Bidi implementation would resolve it to.</li>
+ * <li><code>paraLevel</code> can be set to the
+ * pseudo-level values <code>UBIDI_DEFAULT_LTR</code>
+ * and <code>UBIDI_DEFAULT_RTL</code>.</li>
+ * </ul>
+ *
+ * @see ubidi_setPara
+ *
+ * <p>The related constants are not real, valid level values.
+ * <code>UBIDI_DEFAULT_XXX</code> can be used to specify
+ * a default for the paragraph level for
+ * when the <code>ubidi_setPara()</code> function
+ * shall determine it but there is no
+ * strongly typed character in the input.<p>
+ *
+ * Note that the value for <code>UBIDI_DEFAULT_LTR</code> is even
+ * and the one for <code>UBIDI_DEFAULT_RTL</code> is odd,
+ * just like with normal LTR and RTL level values -
+ * these special values are designed that way. Also, the implementation
+ * assumes that UBIDI_MAX_EXPLICIT_LEVEL is odd.
+ *
+ * Note: The numeric values of the related constants will not change:
+ * They are tied to the use of 7-bit byte values (plus the override bit)
+ * and of the UBiDiLevel=uint8_t data type in this API.
+ *
+ * @see UBIDI_DEFAULT_LTR
+ * @see UBIDI_DEFAULT_RTL
+ * @see UBIDI_LEVEL_OVERRIDE
+ * @see UBIDI_MAX_EXPLICIT_LEVEL
+ * @stable ICU 2.0
+ */
+typedef uint8_t UBiDiLevel;
+
+/** Paragraph level setting.<p>
+ *
+ * Constant indicating that the base direction depends on the first strong
+ * directional character in the text according to the Unicode Bidirectional
+ * Algorithm. If no strong directional character is present,
+ * then set the paragraph level to 0 (left-to-right).<p>
+ *
+ * If this value is used in conjunction with reordering modes
+ * <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or
+ * <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder
+ * is assumed to be visual LTR, and the text after reordering is required
+ * to be the corresponding logical string with appropriate contextual
+ * direction. The direction of the result string will be RTL if either
+ * the righmost or leftmost strong character of the source text is RTL
+ * or Arabic Letter, the direction will be LTR otherwise.<p>
+ *
+ * If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may
+ * be added at the beginning of the result string to ensure round trip
+ * (that the result string, when reordered back to visual, will produce
+ * the original source text).
+ * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT
+ * @see UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
+ * @stable ICU 2.0
+ */
+#define UBIDI_DEFAULT_LTR 0xfe
+
+/** Paragraph level setting.<p>
+ *
+ * Constant indicating that the base direction depends on the first strong
+ * directional character in the text according to the Unicode Bidirectional
+ * Algorithm. If no strong directional character is present,
+ * then set the paragraph level to 1 (right-to-left).<p>
+ *
+ * If this value is used in conjunction with reordering modes
+ * <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or
+ * <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder
+ * is assumed to be visual LTR, and the text after reordering is required
+ * to be the corresponding logical string with appropriate contextual
+ * direction. The direction of the result string will be RTL if either
+ * the righmost or leftmost strong character of the source text is RTL
+ * or Arabic Letter, or if the text contains no strong character;
+ * the direction will be LTR otherwise.<p>
+ *
+ * If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may
+ * be added at the beginning of the result string to ensure round trip
+ * (that the result string, when reordered back to visual, will produce
+ * the original source text).
+ * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT
+ * @see UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
+ * @stable ICU 2.0
+ */
+#define UBIDI_DEFAULT_RTL 0xff
+
+/**
+ * Maximum explicit embedding level.
+ * Same as the max_depth value in the
+ * <a href="http://www.unicode.org/reports/tr9/#BD2">Unicode Bidirectional Algorithm</a>.
+ * (The maximum resolved level can be up to <code>UBIDI_MAX_EXPLICIT_LEVEL+1</code>).
+ * @stable ICU 2.0
+ */
+#define UBIDI_MAX_EXPLICIT_LEVEL 125
+
+/** Bit flag for level input.
+ *  Overrides directional properties.
+ * @stable ICU 2.0
+ */
+#define UBIDI_LEVEL_OVERRIDE 0x80
+
+/**
+ * Special value which can be returned by the mapping functions when a logical
+ * index has no corresponding visual index or vice-versa. This may happen
+ * for the logical-to-visual mapping of a Bidi control when option
+ * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> is specified. This can also happen
+ * for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted
+ * by option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
+ * @see ubidi_getVisualIndex
+ * @see ubidi_getVisualMap
+ * @see ubidi_getLogicalIndex
+ * @see ubidi_getLogicalMap
+ * @stable ICU 3.6
+ */
+#define UBIDI_MAP_NOWHERE   (-1)
+
+/**
+ * <code>UBiDiDirection</code> values indicate the text direction.
+ * @stable ICU 2.0
+ */
+enum UBiDiDirection {
+  /** Left-to-right text. This is a 0 value.
+   * <ul>
+   * <li>As return value for <code>ubidi_getDirection()</code>, it means
+   *     that the source string contains no right-to-left characters, or
+   *     that the source string is empty and the paragraph level is even.
+   * <li> As return value for <code>ubidi_getBaseDirection()</code>, it
+   *      means that the first strong character of the source string has
+   *      a left-to-right direction.
+   * </ul>
+   * @stable ICU 2.0
+   */
+  UBIDI_LTR,
+  /** Right-to-left text. This is a 1 value.
+   * <ul>
+   * <li>As return value for <code>ubidi_getDirection()</code>, it means
+   *     that the source string contains no left-to-right characters, or
+   *     that the source string is empty and the paragraph level is odd.
+   * <li> As return value for <code>ubidi_getBaseDirection()</code>, it
+   *      means that the first strong character of the source string has
+   *      a right-to-left direction.
+   * </ul>
+   * @stable ICU 2.0
+   */
+  UBIDI_RTL,
+  /** Mixed-directional text.
+   * <p>As return value for <code>ubidi_getDirection()</code>, it means
+   *    that the source string contains both left-to-right and
+   *    right-to-left characters.
+   * @stable ICU 2.0
+   */
+  UBIDI_MIXED,
+  /** No strongly directional text.
+   * <p>As return value for <code>ubidi_getBaseDirection()</code>, it means
+   *    that the source string is missing or empty, or contains neither left-to-right
+   *    nor right-to-left characters.
+   * @stable ICU 4.6
+   */
+  UBIDI_NEUTRAL
+};
+
+/** @stable ICU 2.0 */
+typedef enum UBiDiDirection UBiDiDirection;
+
+/**
+ * Forward declaration of the <code>UBiDi</code> structure for the declaration of
+ * the API functions. Its fields are implementation-specific.<p>
+ * This structure holds information about a paragraph (or multiple paragraphs)
+ * of text with Bidi-algorithm-related details, or about one line of
+ * such a paragraph.<p>
+ * Reordering can be done on a line, or on one or more paragraphs which are
+ * then interpreted each as one single line.
+ * @stable ICU 2.0
+ */
+struct UBiDi;
+
+/** @stable ICU 2.0 */
+typedef struct UBiDi UBiDi;
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Allocate a <code>UBiDi</code> structure.
+ * Such an object is initially empty. It is assigned
+ * the Bidi properties of a piece of text containing one or more paragraphs
+ * by <code>ubidi_setPara()</code>
+ * or the Bidi properties of a line within a paragraph by
+ * <code>ubidi_setLine()</code>.<p>
+ * This object can be reused for as long as it is not deallocated
+ * by calling <code>ubidi_close()</code>.<p>
+ * <code>ubidi_setPara()</code> and <code>ubidi_setLine()</code> will allocate
+ * additional memory for internal structures as necessary.
+ *
+ * @return An empty <code>UBiDi</code> object.
+ * @stable ICU 2.0
+ */
+U_STABLE UBiDi * U_EXPORT2
+ubidi_open(void) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Allocate a <code>UBiDi</code> structure with preallocated memory
+ * for internal structures.
+ * This function provides a <code>UBiDi</code> object like <code>ubidi_open()</code>
+ * with no arguments, but it also preallocates memory for internal structures
+ * according to the sizings supplied by the caller.<p>
+ * Subsequent functions will not allocate any more memory, and are thus
+ * guaranteed not to fail because of lack of memory.<p>
+ * The preallocation can be limited to some of the internal memory
+ * by setting some values to 0 here. That means that if, e.g.,
+ * <code>maxRunCount</code> cannot be reasonably predetermined and should not
+ * be set to <code>maxLength</code> (the only failproof value) to avoid
+ * wasting memory, then <code>maxRunCount</code> could be set to 0 here
+ * and the internal structures that are associated with it will be allocated
+ * on demand, just like with <code>ubidi_open()</code>.
+ *
+ * @param maxLength is the maximum text or line length that internal memory
+ *        will be preallocated for. An attempt to associate this object with a
+ *        longer text will fail, unless this value is 0, which leaves the allocation
+ *        up to the implementation.
+ *
+ * @param maxRunCount is the maximum anticipated number of same-level runs
+ *        that internal memory will be preallocated for. An attempt to access
+ *        visual runs on an object that was not preallocated for as many runs
+ *        as the text was actually resolved to will fail,
+ *        unless this value is 0, which leaves the allocation up to the implementation.<br><br>
+ *        The number of runs depends on the actual text and maybe anywhere between
+ *        1 and <code>maxLength</code>. It is typically small.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return An empty <code>UBiDi</code> object with preallocated memory.
+ * @stable ICU 2.0
+ */
+U_STABLE UBiDi * U_EXPORT2
+ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * <code>ubidi_close()</code> must be called to free the memory
+ * associated with a UBiDi object.<p>
+ *
+ * <strong>Important: </strong>
+ * A parent <code>UBiDi</code> object must not be destroyed or reused if
+ * it still has children.
+ * If a <code>UBiDi</code> object has become the <i>child</i>
+ * of another one (its <i>parent</i>) by calling
+ * <code>ubidi_setLine()</code>, then the child object must
+ * be destroyed (closed) or reused (by calling
+ * <code>ubidi_setPara()</code> or <code>ubidi_setLine()</code>)
+ * before the parent object.
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ *
+ * @see ubidi_setPara
+ * @see ubidi_setLine
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_close(UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUBiDiPointer
+ * "Smart pointer" class, closes a UBiDi via ubidi_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUBiDiPointer, UBiDi, ubidi_close);
+
+U_NAMESPACE_END
+
+#endif
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Modify the operation of the Bidi algorithm such that it
+ * approximates an "inverse Bidi" algorithm. This function
+ * must be called before <code>ubidi_setPara()</code>.
+ *
+ * <p>The normal operation of the Bidi algorithm as described
+ * in the Unicode Technical Report is to take text stored in logical
+ * (keyboard, typing) order and to determine the reordering of it for visual
+ * rendering.
+ * Some legacy systems store text in visual order, and for operations
+ * with standard, Unicode-based algorithms, the text needs to be transformed
+ * to logical order. This is effectively the inverse algorithm of the
+ * described Bidi algorithm. Note that there is no standard algorithm for
+ * this "inverse Bidi" and that the current implementation provides only an
+ * approximation of "inverse Bidi".</p>
+ *
+ * <p>With <code>isInverse</code> set to <code>TRUE</code>,
+ * this function changes the behavior of some of the subsequent functions
+ * in a way that they can be used for the inverse Bidi algorithm.
+ * Specifically, runs of text with numeric characters will be treated in a
+ * special way and may need to be surrounded with LRM characters when they are
+ * written in reordered sequence.</p>
+ *
+ * <p>Output runs should be retrieved using <code>ubidi_getVisualRun()</code>.
+ * Since the actual input for "inverse Bidi" is visually ordered text and
+ * <code>ubidi_getVisualRun()</code> gets the reordered runs, these are actually
+ * the runs of the logically ordered output.</p>
+ *
+ * <p>Calling this function with argument <code>isInverse</code> set to
+ * <code>TRUE</code> is equivalent to calling
+ * <code>ubidi_setReorderingMode</code> with argument
+ * <code>reorderingMode</code>
+ * set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br>
+ * Calling this function with argument <code>isInverse</code> set to
+ * <code>FALSE</code> is equivalent to calling
+ * <code>ubidi_setReorderingMode</code> with argument
+ * <code>reorderingMode</code>
+ * set to <code>#UBIDI_REORDER_DEFAULT</code>.
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ *
+ * @param isInverse specifies "forward" or "inverse" Bidi operation.
+ *
+ * @see ubidi_setPara
+ * @see ubidi_writeReordered
+ * @see ubidi_setReorderingMode
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_setInverse(UBiDi *pBiDi, UBool isInverse) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Is this Bidi object set to perform the inverse Bidi algorithm?
+ * <p>Note: calling this function after setting the reordering mode with
+ * <code>ubidi_setReorderingMode</code> will return <code>TRUE</code> if the
+ * reordering mode was set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>,
+ * <code>FALSE</code> for all other values.</p>
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ * @return TRUE if the Bidi object is set to perform the inverse Bidi algorithm
+ * by handling numbers as L.
+ *
+ * @see ubidi_setInverse
+ * @see ubidi_setReorderingMode
+ * @stable ICU 2.0
+ */
+
+U_STABLE UBool U_EXPORT2
+ubidi_isInverse(UBiDi *pBiDi);
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Specify whether block separators must be allocated level zero,
+ * so that successive paragraphs will progress from left to right.
+ * This function must be called before <code>ubidi_setPara()</code>.
+ * Paragraph separators (B) may appear in the text.  Setting them to level zero
+ * means that all paragraph separators (including one possibly appearing
+ * in the last text position) are kept in the reordered text after the text
+ * that they follow in the source text.
+ * When this feature is not enabled, a paragraph separator at the last
+ * position of the text before reordering will go to the first position
+ * of the reordered text when the paragraph level is odd.
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ *
+ * @param orderParagraphsLTR specifies whether paragraph separators (B) must
+ * receive level 0, so that successive paragraphs progress from left to right.
+ *
+ * @see ubidi_setPara
+ * @stable ICU 3.4
+ */
+U_STABLE void U_EXPORT2
+ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Is this Bidi object set to allocate level 0 to block separators so that
+ * successive paragraphs progress from left to right?
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ * @return TRUE if the Bidi object is set to allocate level 0 to block
+ *         separators.
+ *
+ * @see ubidi_orderParagraphsLTR
+ * @stable ICU 3.4
+ */
+U_STABLE UBool U_EXPORT2
+ubidi_isOrderParagraphsLTR(UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * <code>UBiDiReorderingMode</code> values indicate which variant of the Bidi
+ * algorithm to use.
+ *
+ * @see ubidi_setReorderingMode
+ * @stable ICU 3.6
+ */
+typedef enum UBiDiReorderingMode {
+    /** Regular Logical to Visual Bidi algorithm according to Unicode.
+      * This is a 0 value.
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_DEFAULT = 0,
+    /** Logical to Visual algorithm which handles numbers in a way which
+      * mimics the behavior of Windows XP.
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_NUMBERS_SPECIAL,
+    /** Logical to Visual algorithm grouping numbers with adjacent R characters
+      * (reversible algorithm).
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_GROUP_NUMBERS_WITH_R,
+    /** Reorder runs only to transform a Logical LTR string to the Logical RTL
+      * string with the same display, or vice-versa.<br>
+      * If this mode is set together with option
+      * <code>#UBIDI_OPTION_INSERT_MARKS</code>, some Bidi controls in the source
+      * text may be removed and other controls may be added to produce the
+      * minimum combination which has the required display.
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_RUNS_ONLY,
+    /** Visual to Logical algorithm which handles numbers like L
+      * (same algorithm as selected by <code>ubidi_setInverse(TRUE)</code>.
+      * @see ubidi_setInverse
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
+    /** Visual to Logical algorithm equivalent to the regular Logical to Visual
+      * algorithm.
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_INVERSE_LIKE_DIRECT,
+    /** Inverse Bidi (Visual to Logical) algorithm for the
+      * <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> Bidi algorithm.
+      * @stable ICU 3.6 */
+    UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
+#ifndef U_HIDE_DEPRECATED_API
+    /**
+     * Number of values for reordering mode.
+     * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
+     */
+    UBIDI_REORDER_COUNT
+#endif  // U_HIDE_DEPRECATED_API
+} UBiDiReorderingMode;
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Modify the operation of the Bidi algorithm such that it implements some
+ * variant to the basic Bidi algorithm or approximates an "inverse Bidi"
+ * algorithm, depending on different values of the "reordering mode".
+ * This function must be called before <code>ubidi_setPara()</code>, and stays
+ * in effect until called again with a different argument.
+ *
+ * <p>The normal operation of the Bidi algorithm as described
+ * in the Unicode Standard Annex #9 is to take text stored in logical
+ * (keyboard, typing) order and to determine how to reorder it for visual
+ * rendering.</p>
+ *
+ * <p>With the reordering mode set to a value other than
+ * <code>#UBIDI_REORDER_DEFAULT</code>, this function changes the behavior of
+ * some of the subsequent functions in a way such that they implement an
+ * inverse Bidi algorithm or some other algorithm variants.</p>
+ *
+ * <p>Some legacy systems store text in visual order, and for operations
+ * with standard, Unicode-based algorithms, the text needs to be transformed
+ * into logical order. This is effectively the inverse algorithm of the
+ * described Bidi algorithm. Note that there is no standard algorithm for
+ * this "inverse Bidi", so a number of variants are implemented here.</p>
+ *
+ * <p>In other cases, it may be desirable to emulate some variant of the
+ * Logical to Visual algorithm (e.g. one used in MS Windows), or perform a
+ * Logical to Logical transformation.</p>
+ *
+ * <ul>
+ * <li>When the reordering mode is set to <code>#UBIDI_REORDER_DEFAULT</code>,
+ * the standard Bidi Logical to Visual algorithm is applied.</li>
+ *
+ * <li>When the reordering mode is set to
+ * <code>#UBIDI_REORDER_NUMBERS_SPECIAL</code>,
+ * the algorithm used to perform Bidi transformations when calling
+ * <code>ubidi_setPara</code> should approximate the algorithm used in
+ * Microsoft Windows XP rather than strictly conform to the Unicode Bidi
+ * algorithm.
+ * <br>
+ * The differences between the basic algorithm and the algorithm addressed
+ * by this option are as follows:
+ * <ul>
+ *   <li>Within text at an even embedding level, the sequence "123AB"
+ *   (where AB represent R or AL letters) is transformed to "123BA" by the
+ *   Unicode algorithm and to "BA123" by the Windows algorithm.</li>
+ *   <li>Arabic-Indic numbers (AN) are handled by the Windows algorithm just
+ *   like regular numbers (EN).</li>
+ * </ul></li>
+ *
+ * <li>When the reordering mode is set to
+ * <code>#UBIDI_REORDER_GROUP_NUMBERS_WITH_R</code>,
+ * numbers located between LTR text and RTL text are associated with the RTL
+ * text. For instance, an LTR paragraph with content "abc 123 DEF" (where
+ * upper case letters represent RTL characters) will be transformed to
+ * "abc FED 123" (and not "abc 123 FED"), "DEF 123 abc" will be transformed
+ * to "123 FED abc" and "123 FED abc" will be transformed to "DEF 123 abc".
+ * This makes the algorithm reversible and makes it useful when round trip
+ * (from visual to logical and back to visual) must be achieved without
+ * adding LRM characters. However, this is a variation from the standard
+ * Unicode Bidi algorithm.<br>
+ * The source text should not contain Bidi control characters other than LRM
+ * or RLM.</li>
+ *
+ * <li>When the reordering mode is set to
+ * <code>#UBIDI_REORDER_RUNS_ONLY</code>,
+ * a "Logical to Logical" transformation must be performed:
+ * <ul>
+ * <li>If the default text level of the source text (argument <code>paraLevel</code>
+ * in <code>ubidi_setPara</code>) is even, the source text will be handled as
+ * LTR logical text and will be transformed to the RTL logical text which has
+ * the same LTR visual display.</li>
+ * <li>If the default level of the source text is odd, the source text
+ * will be handled as RTL logical text and will be transformed to the
+ * LTR logical text which has the same LTR visual display.</li>
+ * </ul>
+ * This mode may be needed when logical text which is basically Arabic or
+ * Hebrew, with possible included numbers or phrases in English, has to be
+ * displayed as if it had an even embedding level (this can happen if the
+ * displaying application treats all text as if it was basically LTR).
+ * <br>
+ * This mode may also be needed in the reverse case, when logical text which is
+ * basically English, with possible included phrases in Arabic or Hebrew, has to
+ * be displayed as if it had an odd embedding level.
+ * <br>
+ * Both cases could be handled by adding LRE or RLE at the head of the text,
+ * if the display subsystem supports these formatting controls. If it does not,
+ * the problem may be handled by transforming the source text in this mode
+ * before displaying it, so that it will be displayed properly.<br>
+ * The source text should not contain Bidi control characters other than LRM
+ * or RLM.</li>
+ *
+ * <li>When the reordering mode is set to
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>, an "inverse Bidi" algorithm
+ * is applied.
+ * Runs of text with numeric characters will be treated like LTR letters and
+ * may need to be surrounded with LRM characters when they are written in
+ * reordered sequence (the option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> can
+ * be used with function <code>ubidi_writeReordered</code> to this end. This
+ * mode is equivalent to calling <code>ubidi_setInverse()</code> with
+ * argument <code>isInverse</code> set to <code>TRUE</code>.</li>
+ *
+ * <li>When the reordering mode is set to
+ * <code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>, the "direct" Logical to Visual
+ * Bidi algorithm is used as an approximation of an "inverse Bidi" algorithm.
+ * This mode is similar to mode <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>
+ * but is closer to the regular Bidi algorithm.
+ * <br>
+ * For example, an LTR paragraph with the content "FED 123 456 CBA" (where
+ * upper case represents RTL characters) will be transformed to
+ * "ABC 456 123 DEF", as opposed to "DEF 123 456 ABC"
+ * with mode <code>UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br>
+ * When used in conjunction with option
+ * <code>#UBIDI_OPTION_INSERT_MARKS</code>, this mode generally
+ * adds Bidi marks to the output significantly more sparingly than mode
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> with option
+ * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to
+ * <code>ubidi_writeReordered</code>.</li>
+ *
+ * <li>When the reordering mode is set to
+ * <code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the Logical to Visual
+ * Bidi algorithm used in Windows XP is used as an approximation of an "inverse Bidi" algorithm.
+ * <br>
+ * For example, an LTR paragraph with the content "abc FED123" (where
+ * upper case represents RTL characters) will be transformed to "abc 123DEF."</li>
+ * </ul>
+ *
+ * <p>In all the reordering modes specifying an "inverse Bidi" algorithm
+ * (i.e. those with a name starting with <code>UBIDI_REORDER_INVERSE</code>),
+ * output runs should be retrieved using
+ * <code>ubidi_getVisualRun()</code>, and the output text with
+ * <code>ubidi_writeReordered()</code>. The caller should keep in mind that in
+ * "inverse Bidi" modes the input is actually visually ordered text and
+ * reordered output returned by <code>ubidi_getVisualRun()</code> or
+ * <code>ubidi_writeReordered()</code> are actually runs or character string
+ * of logically ordered output.<br>
+ * For all the "inverse Bidi" modes, the source text should not contain
+ * Bidi control characters other than LRM or RLM.</p>
+ *
+ * <p>Note that option <code>#UBIDI_OUTPUT_REVERSE</code> of
+ * <code>ubidi_writeReordered</code> has no useful meaning and should not be
+ * used in conjunction with any value of the reordering mode specifying
+ * "inverse Bidi" or with value <code>UBIDI_REORDER_RUNS_ONLY</code>.
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ * @param reorderingMode specifies the required variant of the Bidi algorithm.
+ *
+ * @see UBiDiReorderingMode
+ * @see ubidi_setInverse
+ * @see ubidi_setPara
+ * @see ubidi_writeReordered
+ * @stable ICU 3.6
+ */
+U_STABLE void U_EXPORT2
+ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * What is the requested reordering mode for a given Bidi object?
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ * @return the current reordering mode of the Bidi object
+ * @see ubidi_setReorderingMode
+ * @stable ICU 3.6
+ */
+U_STABLE UBiDiReorderingMode U_EXPORT2
+ubidi_getReorderingMode(UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * <code>UBiDiReorderingOption</code> values indicate which options are
+ * specified to affect the Bidi algorithm.
+ *
+ * @see ubidi_setReorderingOptions
+ * @stable ICU 3.6
+ */
+typedef enum UBiDiReorderingOption {
+    /**
+     * option value for <code>ubidi_setReorderingOptions</code>:
+     * disable all the options which can be set with this function
+     * @see ubidi_setReorderingOptions
+     * @stable ICU 3.6
+     */
+    UBIDI_OPTION_DEFAULT = 0,
+
+    /**
+     * option bit for <code>ubidi_setReorderingOptions</code>:
+     * insert Bidi marks (LRM or RLM) when needed to ensure correct result of
+     * a reordering to a Logical order
+     *
+     * <p>This option must be set or reset before calling
+     * <code>ubidi_setPara</code>.</p>
+     *
+     * <p>This option is significant only with reordering modes which generate
+     * a result with Logical order, specifically:</p>
+     * <ul>
+     *   <li><code>#UBIDI_REORDER_RUNS_ONLY</code></li>
+     *   <li><code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code></li>
+     *   <li><code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code></li>
+     *   <li><code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code></li>
+     * </ul>
+     *
+     * <p>If this option is set in conjunction with reordering mode
+     * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> or with calling
+     * <code>ubidi_setInverse(TRUE)</code>, it implies
+     * option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>
+     * in calls to function <code>ubidi_writeReordered()</code>.</p>
+     *
+     * <p>For other reordering modes, a minimum number of LRM or RLM characters
+     * will be added to the source text after reordering it so as to ensure
+     * round trip, i.e. when applying the inverse reordering mode on the
+     * resulting logical text with removal of Bidi marks
+     * (option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> set before calling
+     * <code>ubidi_setPara()</code> or option <code>#UBIDI_REMOVE_BIDI_CONTROLS</code>
+     * in <code>ubidi_writeReordered</code>), the result will be identical to the
+     * source text in the first transformation.
+     *
+     * <p>This option will be ignored if specified together with option
+     * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>. It inhibits option
+     * <code>UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to function
+     * <code>ubidi_writeReordered()</code> and it implies option
+     * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to function
+     * <code>ubidi_writeReordered()</code> if the reordering mode is
+     * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.</p>
+     *
+     * @see ubidi_setReorderingMode
+     * @see ubidi_setReorderingOptions
+     * @stable ICU 3.6
+     */
+    UBIDI_OPTION_INSERT_MARKS = 1,
+
+    /**
+     * option bit for <code>ubidi_setReorderingOptions</code>:
+     * remove Bidi control characters
+     *
+     * <p>This option must be set or reset before calling
+     * <code>ubidi_setPara</code>.</p>
+     *
+     * <p>This option nullifies option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
+     * It inhibits option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls
+     * to function <code>ubidi_writeReordered()</code> and it implies option
+     * <code>#UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to that function.</p>
+     *
+     * @see ubidi_setReorderingMode
+     * @see ubidi_setReorderingOptions
+     * @stable ICU 3.6
+     */
+    UBIDI_OPTION_REMOVE_CONTROLS = 2,
+
+    /**
+     * option bit for <code>ubidi_setReorderingOptions</code>:
+     * process the output as part of a stream to be continued
+     *
+     * <p>This option must be set or reset before calling
+     * <code>ubidi_setPara</code>.</p>
+     *
+     * <p>This option specifies that the caller is interested in processing large
+     * text object in parts.
+     * The results of the successive calls are expected to be concatenated by the
+     * caller. Only the call for the last part will have this option bit off.</p>
+     *
+     * <p>When this option bit is on, <code>ubidi_setPara()</code> may process
+     * less than the full source text in order to truncate the text at a meaningful
+     * boundary. The caller should call <code>ubidi_getProcessedLength()</code>
+     * immediately after calling <code>ubidi_setPara()</code> in order to
+     * determine how much of the source text has been processed.
+     * Source text beyond that length should be resubmitted in following calls to
+     * <code>ubidi_setPara</code>. The processed length may be less than
+     * the length of the source text if a character preceding the last character of
+     * the source text constitutes a reasonable boundary (like a block separator)
+     * for text to be continued.<br>
+     * If the last character of the source text constitutes a reasonable
+     * boundary, the whole text will be processed at once.<br>
+     * If nowhere in the source text there exists
+     * such a reasonable boundary, the processed length will be zero.<br>
+     * The caller should check for such an occurrence and do one of the following:
+     * <ul><li>submit a larger amount of text with a better chance to include
+     *         a reasonable boundary.</li>
+     *     <li>resubmit the same text after turning off option
+     *         <code>UBIDI_OPTION_STREAMING</code>.</li></ul>
+     * In all cases, this option should be turned off before processing the last
+     * part of the text.</p>
+     *
+     * <p>When the <code>UBIDI_OPTION_STREAMING</code> option is used,
+     * it is recommended to call <code>ubidi_orderParagraphsLTR()</code> with
+     * argument <code>orderParagraphsLTR</code> set to <code>TRUE</code> before
+     * calling <code>ubidi_setPara</code> so that later paragraphs may be
+     * concatenated to previous paragraphs on the right.</p>
+     *
+     * @see ubidi_setReorderingMode
+     * @see ubidi_setReorderingOptions
+     * @see ubidi_getProcessedLength
+     * @see ubidi_orderParagraphsLTR
+     * @stable ICU 3.6
+     */
+    UBIDI_OPTION_STREAMING = 4
+} UBiDiReorderingOption;
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Specify which of the reordering options
+ * should be applied during Bidi transformations.
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ * @param reorderingOptions is a combination of zero or more of the following
+ * options:
+ * <code>#UBIDI_OPTION_DEFAULT</code>, <code>#UBIDI_OPTION_INSERT_MARKS</code>,
+ * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>, <code>#UBIDI_OPTION_STREAMING</code>.
+ *
+ * @see ubidi_getReorderingOptions
+ * @stable ICU 3.6
+ */
+U_STABLE void U_EXPORT2
+ubidi_setReorderingOptions(UBiDi *pBiDi, uint32_t reorderingOptions) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * What are the reordering options applied to a given Bidi object?
+ *
+ * @param pBiDi is a <code>UBiDi</code> object.
+ * @return the current reordering options of the Bidi object
+ * @see ubidi_setReorderingOptions
+ * @stable ICU 3.6
+ */
+U_STABLE uint32_t U_EXPORT2
+ubidi_getReorderingOptions(UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the context before a call to ubidi_setPara().<p>
+ *
+ * ubidi_setPara() computes the left-right directionality for a given piece
+ * of text which is supplied as one of its arguments. Sometimes this piece
+ * of text (the "main text") should be considered in context, because text
+ * appearing before ("prologue") and/or after ("epilogue") the main text
+ * may affect the result of this computation.<p>
+ *
+ * This function specifies the prologue and/or the epilogue for the next
+ * call to ubidi_setPara(). The characters specified as prologue and
+ * epilogue should not be modified by the calling program until the call
+ * to ubidi_setPara() has returned. If successive calls to ubidi_setPara()
+ * all need specification of a context, ubidi_setContext() must be called
+ * before each call to ubidi_setPara(). In other words, a context is not
+ * "remembered" after the following successful call to ubidi_setPara().<p>
+ *
+ * If a call to ubidi_setPara() specifies UBIDI_DEFAULT_LTR or
+ * UBIDI_DEFAULT_RTL as paraLevel and is preceded by a call to
+ * ubidi_setContext() which specifies a prologue, the paragraph level will
+ * be computed taking in consideration the text in the prologue.<p>
+ *
+ * When ubidi_setPara() is called without a previous call to
+ * ubidi_setContext, the main text is handled as if preceded and followed
+ * by strong directional characters at the current paragraph level.
+ * Calling ubidi_setContext() with specification of a prologue will change
+ * this behavior by handling the main text as if preceded by the last
+ * strong character appearing in the prologue, if any.
+ * Calling ubidi_setContext() with specification of an epilogue will change
+ * the behavior of ubidi_setPara() by handling the main text as if followed
+ * by the first strong character or digit appearing in the epilogue, if any.<p>
+ *
+ * Note 1: if <code>ubidi_setContext</code> is called repeatedly without
+ *         calling <code>ubidi_setPara</code>, the earlier calls have no effect,
+ *         only the last call will be remembered for the next call to
+ *         <code>ubidi_setPara</code>.<p>
+ *
+ * Note 2: calling <code>ubidi_setContext(pBiDi, NULL, 0, NULL, 0, &errorCode)</code>
+ *         cancels any previous setting of non-empty prologue or epilogue.
+ *         The next call to <code>ubidi_setPara()</code> will process no
+ *         prologue or epilogue.<p>
+ *
+ * Note 3: users must be aware that even after setting the context
+ *         before a call to ubidi_setPara() to perform e.g. a logical to visual
+ *         transformation, the resulting string may not be identical to what it
+ *         would have been if all the text, including prologue and epilogue, had
+ *         been processed together.<br>
+ * Example (upper case letters represent RTL characters):<br>
+ * &nbsp;&nbsp;prologue = "<code>abc DE</code>"<br>
+ * &nbsp;&nbsp;epilogue = none<br>
+ * &nbsp;&nbsp;main text = "<code>FGH xyz</code>"<br>
+ * &nbsp;&nbsp;paraLevel = UBIDI_LTR<br>
+ * &nbsp;&nbsp;display without prologue = "<code>HGF xyz</code>"
+ *             ("HGF" is adjacent to "xyz")<br>
+ * &nbsp;&nbsp;display with prologue = "<code>abc HGFED xyz</code>"
+ *             ("HGF" is not adjacent to "xyz")<br>
+ *
+ * @param pBiDi is a paragraph <code>UBiDi</code> object.
+ *
+ * @param prologue is a pointer to the text which precedes the text that
+ *        will be specified in a coming call to ubidi_setPara().
+ *        If there is no prologue to consider, then <code>proLength</code>
+ *        must be zero and this pointer can be NULL.
+ *
+ * @param proLength is the length of the prologue; if <code>proLength==-1</code>
+ *        then the prologue must be zero-terminated.
+ *        Otherwise proLength must be >= 0. If <code>proLength==0</code>, it means
+ *        that there is no prologue to consider.
+ *
+ * @param epilogue is a pointer to the text which follows the text that
+ *        will be specified in a coming call to ubidi_setPara().
+ *        If there is no epilogue to consider, then <code>epiLength</code>
+ *        must be zero and this pointer can be NULL.
+ *
+ * @param epiLength is the length of the epilogue; if <code>epiLength==-1</code>
+ *        then the epilogue must be zero-terminated.
+ *        Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, it means
+ *        that there is no epilogue to consider.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @see ubidi_setPara
+ * @stable ICU 4.8
+ */
+U_STABLE void U_EXPORT2
+ubidi_setContext(UBiDi *pBiDi,
+                 const UChar *prologue, int32_t proLength,
+                 const UChar *epilogue, int32_t epiLength,
+                 UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Perform the Unicode Bidi algorithm. It is defined in the
+ * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>,
+ * version 13,
+ * also described in The Unicode Standard, Version 4.0 .<p>
+ *
+ * This function takes a piece of plain text containing one or more paragraphs,
+ * with or without externally specified embedding levels from <i>styled</i>
+ * text and computes the left-right-directionality of each character.<p>
+ *
+ * If the entire text is all of the same directionality, then
+ * the function may not perform all the steps described by the algorithm,
+ * i.e., some levels may not be the same as if all steps were performed.
+ * This is not relevant for unidirectional text.<br>
+ * For example, in pure LTR text with numbers the numbers would get
+ * a resolved level of 2 higher than the surrounding text according to
+ * the algorithm. This implementation may set all resolved levels to
+ * the same value in such a case.<p>
+ *
+ * The text can be composed of multiple paragraphs. Occurrence of a block
+ * separator in the text terminates a paragraph, and whatever comes next starts
+ * a new paragraph. The exception to this rule is when a Carriage Return (CR)
+ * is followed by a Line Feed (LF). Both CR and LF are block separators, but
+ * in that case, the pair of characters is considered as terminating the
+ * preceding paragraph, and a new paragraph will be started by a character
+ * coming after the LF.
+ *
+ * @param pBiDi A <code>UBiDi</code> object allocated with <code>ubidi_open()</code>
+ *        which will be set to contain the reordering information,
+ *        especially the resolved levels for all the characters in <code>text</code>.
+ *
+ * @param text is a pointer to the text that the Bidi algorithm will be performed on.
+ *        This pointer is stored in the UBiDi object and can be retrieved
+ *        with <code>ubidi_getText()</code>.<br>
+ *        <strong>Note:</strong> the text must be (at least) <code>length</code> long.
+ *
+ * @param length is the length of the text; if <code>length==-1</code> then
+ *        the text must be zero-terminated.
+ *
+ * @param paraLevel specifies the default level for the text;
+ *        it is typically 0 (LTR) or 1 (RTL).
+ *        If the function shall determine the paragraph level from the text,
+ *        then <code>paraLevel</code> can be set to
+ *        either <code>#UBIDI_DEFAULT_LTR</code>
+ *        or <code>#UBIDI_DEFAULT_RTL</code>; if the text contains multiple
+ *        paragraphs, the paragraph level shall be determined separately for
+ *        each paragraph; if a paragraph does not include any strongly typed
+ *        character, then the desired default is used (0 for LTR or 1 for RTL).
+ *        Any other value between 0 and <code>#UBIDI_MAX_EXPLICIT_LEVEL</code>
+ *        is also valid, with odd levels indicating RTL.
+ *
+ * @param embeddingLevels (in) may be used to preset the embedding and override levels,
+ *        ignoring characters like LRE and PDF in the text.
+ *        A level overrides the directional property of its corresponding
+ *        (same index) character if the level has the
+ *        <code>#UBIDI_LEVEL_OVERRIDE</code> bit set.<br><br>
+ *        Aside from that bit, it must be
+ *        <code>paraLevel<=embeddingLevels[]<=UBIDI_MAX_EXPLICIT_LEVEL</code>,
+ *        except that level 0 is always allowed.
+ *        Level 0 for a paragraph separator prevents reordering of paragraphs;
+ *        this only works reliably if <code>#UBIDI_LEVEL_OVERRIDE</code>
+ *        is also set for paragraph separators.
+ *        Level 0 for other characters is treated as a wildcard
+ *        and is lifted up to the resolved level of the surrounding paragraph.<br><br>
+ *        <strong>Caution: </strong>A copy of this pointer, not of the levels,
+ *        will be stored in the <code>UBiDi</code> object;
+ *        the <code>embeddingLevels</code> array must not be
+ *        deallocated before the <code>UBiDi</code> structure is destroyed or reused,
+ *        and the <code>embeddingLevels</code>
+ *        should not be modified to avoid unexpected results on subsequent Bidi operations.
+ *        However, the <code>ubidi_setPara()</code> and
+ *        <code>ubidi_setLine()</code> functions may modify some or all of the levels.<br><br>
+ *        After the <code>UBiDi</code> object is reused or destroyed, the caller
+ *        must take care of the deallocation of the <code>embeddingLevels</code> array.<br><br>
+ *        <strong>Note:</strong> the <code>embeddingLevels</code> array must be
+ *        at least <code>length</code> long.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
+              UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels,
+              UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * <code>ubidi_setLine()</code> sets a <code>UBiDi</code> to
+ * contain the reordering information, especially the resolved levels,
+ * for all the characters in a line of text. This line of text is
+ * specified by referring to a <code>UBiDi</code> object representing
+ * this information for a piece of text containing one or more paragraphs,
+ * and by specifying a range of indexes in this text.<p>
+ * In the new line object, the indexes will range from 0 to <code>limit-start-1</code>.<p>
+ *
+ * This is used after calling <code>ubidi_setPara()</code>
+ * for a piece of text, and after line-breaking on that text.
+ * It is not necessary if each paragraph is treated as a single line.<p>
+ *
+ * After line-breaking, rules (L1) and (L2) for the treatment of
+ * trailing WS and for reordering are performed on
+ * a <code>UBiDi</code> object that represents a line.<p>
+ *
+ * <strong>Important: </strong><code>pLineBiDi</code> shares data with
+ * <code>pParaBiDi</code>.
+ * You must destroy or reuse <code>pLineBiDi</code> before <code>pParaBiDi</code>.
+ * In other words, you must destroy or reuse the <code>UBiDi</code> object for a line
+ * before the object for its parent paragraph.<p>
+ *
+ * The text pointer that was stored in <code>pParaBiDi</code> is also copied,
+ * and <code>start</code> is added to it so that it points to the beginning of the
+ * line for this object.
+ *
+ * @param pParaBiDi is the parent paragraph object. It must have been set
+ * by a successful call to ubidi_setPara.
+ *
+ * @param start is the line's first index into the text.
+ *
+ * @param limit is just behind the line's last index into the text
+ *        (its last index +1).<br>
+ *        It must be <code>0<=start<limit<=</code>containing paragraph limit.
+ *        If the specified line crosses a paragraph boundary, the function
+ *        will terminate with error code U_ILLEGAL_ARGUMENT_ERROR.
+ *
+ * @param pLineBiDi is the object that will now represent a line of the text.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @see ubidi_setPara
+ * @see ubidi_getProcessedLength
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_setLine(const UBiDi *pParaBiDi,
+              int32_t start, int32_t limit,
+              UBiDi *pLineBiDi,
+              UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the directionality of the text.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @return a value of <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>
+ *         or <code>UBIDI_MIXED</code>
+ *         that indicates if the entire text
+ *         represented by this object is unidirectional,
+ *         and which direction, or if it is mixed-directional.
+ * Note -  The value <code>UBIDI_NEUTRAL</code> is never returned from this method.
+ *
+ * @see UBiDiDirection
+ * @stable ICU 2.0
+ */
+U_STABLE UBiDiDirection U_EXPORT2
+ubidi_getDirection(const UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Gets the base direction of the text provided according
+ * to the Unicode Bidirectional Algorithm. The base direction
+ * is derived from the first character in the string with bidirectional
+ * character type L, R, or AL. If the first such character has type L,
+ * <code>UBIDI_LTR</code> is returned. If the first such character has
+ * type R or AL, <code>UBIDI_RTL</code> is returned. If the string does
+ * not contain any character of these types, then
+ * <code>UBIDI_NEUTRAL</code> is returned.
+ *
+ * This is a lightweight function for use when only the base direction
+ * is needed and no further bidi processing of the text is needed.
+ *
+ * @param text is a pointer to the text whose base
+ *             direction is needed.
+ * Note: the text must be (at least) @c length long.
+ *
+ * @param length is the length of the text;
+ *               if <code>length==-1</code> then the text
+ *               must be zero-terminated.
+ *
+ * @return  <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>,
+ *          <code>UBIDI_NEUTRAL</code>
+ *
+ * @see UBiDiDirection
+ * @stable ICU 4.6
+ */
+U_STABLE UBiDiDirection U_EXPORT2
+ubidi_getBaseDirection(const UChar *text,  int32_t length ) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the pointer to the text.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @return The pointer to the text that the UBiDi object was created for.
+ *
+ * @see ubidi_setPara
+ * @see ubidi_setLine
+ * @stable ICU 2.0
+ */
+U_STABLE const UChar * U_EXPORT2
+ubidi_getText(const UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the length of the text.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @return The length of the text that the UBiDi object was created for.
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_getLength(const UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the paragraph level of the text.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @return The paragraph level. If there are multiple paragraphs, their
+ *         level may vary if the required paraLevel is UBIDI_DEFAULT_LTR or
+ *         UBIDI_DEFAULT_RTL.  In that case, the level of the first paragraph
+ *         is returned.
+ *
+ * @see UBiDiLevel
+ * @see ubidi_getParagraph
+ * @see ubidi_getParagraphByIndex
+ * @stable ICU 2.0
+ */
+U_STABLE UBiDiLevel U_EXPORT2
+ubidi_getParaLevel(const UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the number of paragraphs.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @return The number of paragraphs.
+ * @stable ICU 3.4
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_countParagraphs(UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get a paragraph, given a position within the text.
+ * This function returns information about a paragraph.<br>
+ * Note: if the paragraph index is known, it is more efficient to
+ * retrieve the paragraph information using ubidi_getParagraphByIndex().<p>
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param charIndex is the index of a character within the text, in the
+ *        range <code>[0..ubidi_getProcessedLength(pBiDi)-1]</code>.
+ *
+ * @param pParaStart will receive the index of the first character of the
+ *        paragraph in the text.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pParaLimit will receive the limit of the paragraph.
+ *        The l-value that you point to here may be the
+ *        same expression (variable) as the one for
+ *        <code>charIndex</code>.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pParaLevel will receive the level of the paragraph.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The index of the paragraph containing the specified position.
+ *
+ * @see ubidi_getProcessedLength
+ * @stable ICU 3.4
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_getParagraph(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart,
+                   int32_t *pParaLimit, UBiDiLevel *pParaLevel,
+                   UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get a paragraph, given the index of this paragraph.
+ *
+ * This function returns information about a paragraph.<p>
+ *
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
+ *
+ * @param paraIndex is the number of the paragraph, in the
+ *        range <code>[0..ubidi_countParagraphs(pBiDi)-1]</code>.
+ *
+ * @param pParaStart will receive the index of the first character of the
+ *        paragraph in the text.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pParaLimit will receive the limit of the paragraph.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pParaLevel will receive the level of the paragraph.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @stable ICU 3.4
+ */
+U_STABLE void U_EXPORT2
+ubidi_getParagraphByIndex(const UBiDi *pBiDi, int32_t paraIndex,
+                          int32_t *pParaStart, int32_t *pParaLimit,
+                          UBiDiLevel *pParaLevel, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the level for one character.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param charIndex the index of a character. It must be in the range
+ *         [0..ubidi_getProcessedLength(pBiDi)].
+ *
+ * @return The level for the character at charIndex (0 if charIndex is not
+ *         in the valid range).
+ *
+ * @see UBiDiLevel
+ * @see ubidi_getProcessedLength
+ * @stable ICU 2.0
+ */
+U_STABLE UBiDiLevel U_EXPORT2
+ubidi_getLevelAt(const UBiDi *pBiDi, int32_t charIndex) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get an array of levels for each character.<p>
+ *
+ * Note that this function may allocate memory under some
+ * circumstances, unlike <code>ubidi_getLevelAt()</code>.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object, whose
+ *        text length must be strictly positive.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The levels array for the text,
+ *         or <code>NULL</code> if an error occurs.
+ *
+ * @see UBiDiLevel
+ * @see ubidi_getProcessedLength
+ * @stable ICU 2.0
+ */
+U_STABLE const UBiDiLevel * U_EXPORT2
+ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get a logical run.
+ * This function returns information about a run and is used
+ * to retrieve runs in logical order.<p>
+ * This is especially useful for line-breaking on a paragraph.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param logicalPosition is a logical position within the source text.
+ *
+ * @param pLogicalLimit will receive the limit of the corresponding run.
+ *        The l-value that you point to here may be the
+ *        same expression (variable) as the one for
+ *        <code>logicalPosition</code>.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @param pLevel will receive the level of the corresponding run.
+ *        This pointer can be <code>NULL</code> if this
+ *        value is not necessary.
+ *
+ * @see ubidi_getProcessedLength
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_getLogicalRun(const UBiDi *pBiDi, int32_t logicalPosition,
+                    int32_t *pLogicalLimit, UBiDiLevel *pLevel) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the number of runs.
+ * This function may invoke the actual reordering on the
+ * <code>UBiDi</code> object, after <code>ubidi_setPara()</code>
+ * may have resolved only the levels of the text. Therefore,
+ * <code>ubidi_countRuns()</code> may have to allocate memory,
+ * and may fail doing so.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The number of runs.
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_countRuns(UBiDi *pBiDi, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get one run's logical start, length, and directionality,
+ * which can be 0 for LTR or 1 for RTL.
+ * In an RTL run, the character at the logical start is
+ * visually on the right of the displayed run.
+ * The length is the number of characters in the run.<p>
+ * <code>ubidi_countRuns()</code> should be called
+ * before the runs are retrieved.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param runIndex is the number of the run in visual order, in the
+ *        range <code>[0..ubidi_countRuns(pBiDi)-1]</code>.
+ *
+ * @param pLogicalStart is the first logical character index in the text.
+ *        The pointer may be <code>NULL</code> if this index is not needed.
+ *
+ * @param pLength is the number of characters (at least one) in the run.
+ *        The pointer may be <code>NULL</code> if this is not needed.
+ *
+ * @return the directionality of the run,
+ *         <code>UBIDI_LTR==0</code> or <code>UBIDI_RTL==1</code>,
+ *         never <code>UBIDI_MIXED</code>,
+ *         never <code>UBIDI_NEUTRAL</code>.
+ *
+ * @see ubidi_countRuns
+ *
+ * Example:
+ * <pre>
+ * \code
+ * int32_t i, count=ubidi_countRuns(pBiDi),
+ *         logicalStart, visualIndex=0, length;
+ * for(i=0; i<count; ++i) {
+ *    if(UBIDI_LTR==ubidi_getVisualRun(pBiDi, i, &logicalStart, &length)) {
+ *         do { // LTR
+ *             show_char(text[logicalStart++], visualIndex++);
+ *         } while(--length>0);
+ *     } else {
+ *         logicalStart+=length;  // logicalLimit
+ *         do { // RTL
+ *             show_char(text[--logicalStart], visualIndex++);
+ *         } while(--length>0);
+ *     }
+ * }
+ *\endcode
+ * </pre>
+ *
+ * Note that in right-to-left runs, code like this places
+ * second surrogates before first ones (which is generally a bad idea)
+ * and combining characters before base characters.
+ * <p>
+ * Use of <code>ubidi_writeReordered()</code>, optionally with the
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code> option, can be considered in order
+ * to avoid these issues.
+ * @stable ICU 2.0
+ */
+U_STABLE UBiDiDirection U_EXPORT2
+ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex,
+                   int32_t *pLogicalStart, int32_t *pLength) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the visual position from a logical text position.
+ * If such a mapping is used many times on the same
+ * <code>UBiDi</code> object, then calling
+ * <code>ubidi_getLogicalMap()</code> is more efficient.<p>
+ *
+ * The value returned may be <code>#UBIDI_MAP_NOWHERE</code> if there is no
+ * visual position because the corresponding text character is a Bidi control
+ * removed from output by the option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>.
+ * <p>
+ * When the visual output is altered by using options of
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual position returned may not
+ * be correct. It is advised to use, when possible, reordering options
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
+ * <p>
+ * Note that in right-to-left runs, this mapping places
+ * second surrogates before first ones (which is generally a bad idea)
+ * and combining characters before base characters.
+ * Use of <code>ubidi_writeReordered()</code>, optionally with the
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code> option can be considered instead
+ * of using the mapping, in order to avoid these issues.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param logicalIndex is the index of a character in the text.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The visual position of this character.
+ *
+ * @see ubidi_getLogicalMap
+ * @see ubidi_getLogicalIndex
+ * @see ubidi_getProcessedLength
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the logical text position from a visual position.
+ * If such a mapping is used many times on the same
+ * <code>UBiDi</code> object, then calling
+ * <code>ubidi_getVisualMap()</code> is more efficient.<p>
+ *
+ * The value returned may be <code>#UBIDI_MAP_NOWHERE</code> if there is no
+ * logical position because the corresponding text character is a Bidi mark
+ * inserted in the output by option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
+ * <p>
+ * This is the inverse function to <code>ubidi_getVisualIndex()</code>.
+ * <p>
+ * When the visual output is altered by using options of
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical position returned may not
+ * be correct. It is advised to use, when possible, reordering options
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param visualIndex is the visual position of a character.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The index of this character in the text.
+ *
+ * @see ubidi_getVisualMap
+ * @see ubidi_getVisualIndex
+ * @see ubidi_getResultLength
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get a logical-to-visual index map (array) for the characters in the UBiDi
+ * (paragraph or line) object.
+ * <p>
+ * Some values in the map may be <code>#UBIDI_MAP_NOWHERE</code> if the
+ * corresponding text characters are Bidi controls removed from the visual
+ * output by the option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>.
+ * <p>
+ * When the visual output is altered by using options of
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual positions returned may not
+ * be correct. It is advised to use, when possible, reordering options
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
+ * <p>
+ * Note that in right-to-left runs, this mapping places
+ * second surrogates before first ones (which is generally a bad idea)
+ * and combining characters before base characters.
+ * Use of <code>ubidi_writeReordered()</code>, optionally with the
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code> option can be considered instead
+ * of using the mapping, in order to avoid these issues.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param indexMap is a pointer to an array of <code>ubidi_getProcessedLength()</code>
+ *        indexes which will reflect the reordering of the characters.
+ *        If option <code>#UBIDI_OPTION_INSERT_MARKS</code> is set, the number
+ *        of elements allocated in <code>indexMap</code> must be no less than
+ *        <code>ubidi_getResultLength()</code>.
+ *        The array does not need to be initialized.<br><br>
+ *        The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @see ubidi_getVisualMap
+ * @see ubidi_getVisualIndex
+ * @see ubidi_getProcessedLength
+ * @see ubidi_getResultLength
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get a visual-to-logical index map (array) for the characters in the UBiDi
+ * (paragraph or line) object.
+ * <p>
+ * Some values in the map may be <code>#UBIDI_MAP_NOWHERE</code> if the
+ * corresponding text characters are Bidi marks inserted in the visual output
+ * by the option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
+ * <p>
+ * When the visual output is altered by using options of
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical positions returned may not
+ * be correct. It is advised to use, when possible, reordering options
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
+ *
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
+ *
+ * @param indexMap is a pointer to an array of <code>ubidi_getResultLength()</code>
+ *        indexes which will reflect the reordering of the characters.
+ *        If option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> is set, the number
+ *        of elements allocated in <code>indexMap</code> must be no less than
+ *        <code>ubidi_getProcessedLength()</code>.
+ *        The array does not need to be initialized.<br><br>
+ *        The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @see ubidi_getLogicalMap
+ * @see ubidi_getLogicalIndex
+ * @see ubidi_getProcessedLength
+ * @see ubidi_getResultLength
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * This is a convenience function that does not use a UBiDi object.
+ * It is intended to be used for when an application has determined the levels
+ * of objects (character sequences) and just needs to have them reordered (L2).
+ * This is equivalent to using <code>ubidi_getLogicalMap()</code> on a
+ * <code>UBiDi</code> object.
+ *
+ * @param levels is an array with <code>length</code> levels that have been determined by
+ *        the application.
+ *
+ * @param length is the number of levels in the array, or, semantically,
+ *        the number of objects to be reordered.
+ *        It must be <code>length>0</code>.
+ *
+ * @param indexMap is a pointer to an array of <code>length</code>
+ *        indexes which will reflect the reordering of the characters.
+ *        The array does not need to be initialized.<p>
+ *        The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * This is a convenience function that does not use a UBiDi object.
+ * It is intended to be used for when an application has determined the levels
+ * of objects (character sequences) and just needs to have them reordered (L2).
+ * This is equivalent to using <code>ubidi_getVisualMap()</code> on a
+ * <code>UBiDi</code> object.
+ *
+ * @param levels is an array with <code>length</code> levels that have been determined by
+ *        the application.
+ *
+ * @param length is the number of levels in the array, or, semantically,
+ *        the number of objects to be reordered.
+ *        It must be <code>length>0</code>.
+ *
+ * @param indexMap is a pointer to an array of <code>length</code>
+ *        indexes which will reflect the reordering of the characters.
+ *        The array does not need to be initialized.<p>
+ *        The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Invert an index map.
+ * The index mapping of the first map is inverted and written to
+ * the second one.
+ *
+ * @param srcMap is an array with <code>length</code> elements
+ *        which defines the original mapping from a source array containing
+ *        <code>length</code> elements to a destination array.
+ *        Some elements of the source array may have no mapping in the
+ *        destination array. In that case, their value will be
+ *        the special value <code>UBIDI_MAP_NOWHERE</code>.
+ *        All elements must be >=0 or equal to <code>UBIDI_MAP_NOWHERE</code>.
+ *        Some elements may have a value >= <code>length</code>, if the
+ *        destination array has more elements than the source array.
+ *        There must be no duplicate indexes (two or more elements with the
+ *        same value except <code>UBIDI_MAP_NOWHERE</code>).
+ *
+ * @param destMap is an array with a number of elements equal to 1 + the highest
+ *        value in <code>srcMap</code>.
+ *        <code>destMap</code> will be filled with the inverse mapping.
+ *        If element with index i in <code>srcMap</code> has a value k different
+ *        from <code>UBIDI_MAP_NOWHERE</code>, this means that element i of
+ *        the source array maps to element k in the destination array.
+ *        The inverse map will have value i in its k-th element.
+ *        For all elements of the destination array which do not map to
+ *        an element in the source array, the corresponding element in the
+ *        inverse map will have a value equal to <code>UBIDI_MAP_NOWHERE</code>.
+ *
+ * @param length is the length of each array.
+ * @see UBIDI_MAP_NOWHERE
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/** option flags for ubidi_writeReordered() */
+
+/**
+ * option bit for ubidi_writeReordered():
+ * keep combining characters after their base characters in RTL runs
+ *
+ * @see ubidi_writeReordered
+ * @stable ICU 2.0
+ */
+#define UBIDI_KEEP_BASE_COMBINING       1
+
+/**
+ * option bit for ubidi_writeReordered():
+ * replace characters with the "mirrored" property in RTL runs
+ * by their mirror-image mappings
+ *
+ * @see ubidi_writeReordered
+ * @stable ICU 2.0
+ */
+#define UBIDI_DO_MIRRORING              2
+
+/**
+ * option bit for ubidi_writeReordered():
+ * surround the run with LRMs if necessary;
+ * this is part of the approximate "inverse Bidi" algorithm
+ *
+ * <p>This option does not imply corresponding adjustment of the index
+ * mappings.</p>
+ *
+ * @see ubidi_setInverse
+ * @see ubidi_writeReordered
+ * @stable ICU 2.0
+ */
+#define UBIDI_INSERT_LRM_FOR_NUMERIC    4
+
+/**
+ * option bit for ubidi_writeReordered():
+ * remove Bidi control characters
+ * (this does not affect #UBIDI_INSERT_LRM_FOR_NUMERIC)
+ *
+ * <p>This option does not imply corresponding adjustment of the index
+ * mappings.</p>
+ *
+ * @see ubidi_writeReordered
+ * @stable ICU 2.0
+ */
+#define UBIDI_REMOVE_BIDI_CONTROLS      8
+
+/**
+ * option bit for ubidi_writeReordered():
+ * write the output in reverse order
+ *
+ * <p>This has the same effect as calling <code>ubidi_writeReordered()</code>
+ * first without this option, and then calling
+ * <code>ubidi_writeReverse()</code> without mirroring.
+ * Doing this in the same step is faster and avoids a temporary buffer.
+ * An example for using this option is output to a character terminal that
+ * is designed for RTL scripts and stores text in reverse order.</p>
+ *
+ * @see ubidi_writeReordered
+ * @stable ICU 2.0
+ */
+#define UBIDI_OUTPUT_REVERSE            16
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the length of the source text processed by the last call to
+ * <code>ubidi_setPara()</code>. This length may be different from the length
+ * of the source text if option <code>#UBIDI_OPTION_STREAMING</code>
+ * has been set.
+ * <br>
+ * Note that whenever the length of the text affects the execution or the
+ * result of a function, it is the processed length which must be considered,
+ * except for <code>ubidi_setPara</code> (which receives unprocessed source
+ * text) and <code>ubidi_getLength</code> (which returns the original length
+ * of the source text).<br>
+ * In particular, the processed length is the one to consider in the following
+ * cases:
+ * <ul>
+ * <li>maximum value of the <code>limit</code> argument of
+ * <code>ubidi_setLine</code></li>
+ * <li>maximum value of the <code>charIndex</code> argument of
+ * <code>ubidi_getParagraph</code></li>
+ * <li>maximum value of the <code>charIndex</code> argument of
+ * <code>ubidi_getLevelAt</code></li>
+ * <li>number of elements in the array returned by <code>ubidi_getLevels</code></li>
+ * <li>maximum value of the <code>logicalStart</code> argument of
+ * <code>ubidi_getLogicalRun</code></li>
+ * <li>maximum value of the <code>logicalIndex</code> argument of
+ * <code>ubidi_getVisualIndex</code></li>
+ * <li>number of elements filled in the <code>*indexMap</code> argument of
+ * <code>ubidi_getLogicalMap</code></li>
+ * <li>length of text processed by <code>ubidi_writeReordered</code></li>
+ * </ul>
+ *
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
+ *
+ * @return The length of the part of the source text processed by
+ *         the last call to <code>ubidi_setPara</code>.
+ * @see ubidi_setPara
+ * @see UBIDI_OPTION_STREAMING
+ * @stable ICU 3.6
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_getProcessedLength(const UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the length of the reordered text resulting from the last call to
+ * <code>ubidi_setPara()</code>. This length may be different from the length
+ * of the source text if option <code>#UBIDI_OPTION_INSERT_MARKS</code>
+ * or option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> has been set.
+ * <br>
+ * This resulting length is the one to consider in the following cases:
+ * <ul>
+ * <li>maximum value of the <code>visualIndex</code> argument of
+ * <code>ubidi_getLogicalIndex</code></li>
+ * <li>number of elements of the <code>*indexMap</code> argument of
+ * <code>ubidi_getVisualMap</code></li>
+ * </ul>
+ * Note that this length stays identical to the source text length if
+ * Bidi marks are inserted or removed using option bits of
+ * <code>ubidi_writeReordered</code>, or if option
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> has been set.
+ *
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
+ *
+ * @return The length of the reordered text resulting from
+ *         the last call to <code>ubidi_setPara</code>.
+ * @see ubidi_setPara
+ * @see UBIDI_OPTION_INSERT_MARKS
+ * @see UBIDI_OPTION_REMOVE_CONTROLS
+ * @stable ICU 3.6
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_getResultLength(const UBiDi *pBiDi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+U_CDECL_BEGIN
+
+#ifndef U_HIDE_DEPRECATED_API
+/**
+ * Value returned by <code>UBiDiClassCallback</code> callbacks when
+ * there is no need to override the standard Bidi class for a given code point.
+ *
+ * This constant is deprecated; use u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 instead.
+ *
+ * @see UBiDiClassCallback
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
+ */
+#define U_BIDI_CLASS_DEFAULT  U_CHAR_DIRECTION_COUNT
+#endif  // U_HIDE_DEPRECATED_API
+
+/**
+ * Callback type declaration for overriding default Bidi class values with
+ * custom ones.
+ * <p>Usually, the function pointer will be propagated to a <code>UBiDi</code>
+ * object by calling the <code>ubidi_setClassCallback()</code> function;
+ * then the callback will be invoked by the UBA implementation any time the
+ * class of a character is to be determined.</p>
+ *
+ * @param context is a pointer to the callback private data.
+ *
+ * @param c       is the code point to get a Bidi class for.
+ *
+ * @return The directional property / Bidi class for the given code point
+ *         <code>c</code> if the default class has been overridden, or
+ *         <code>u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>
+ *         if the standard Bidi class value for <code>c</code> is to be used.
+ * @see ubidi_setClassCallback
+ * @see ubidi_getClassCallback
+ * @stable ICU 3.6
+ */
+typedef UCharDirection U_CALLCONV
+UBiDiClassCallback(const void *context, UChar32 c);
+
+U_CDECL_END
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Retrieve the Bidi class for a given code point.
+ * <p>If a <code>#UBiDiClassCallback</code> callback is defined and returns a
+ * value other than <code>u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>,
+ * that value is used; otherwise the default class determination mechanism is invoked.</p>
+ *
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
+ *
+ * @param c     is the code point whose Bidi class must be retrieved.
+ *
+ * @return The Bidi class for character <code>c</code> based
+ *         on the given <code>pBiDi</code> instance.
+ * @see UBiDiClassCallback
+ * @stable ICU 3.6
+ */
+U_STABLE UCharDirection U_EXPORT2
+ubidi_getCustomizedClass(UBiDi *pBiDi, UChar32 c) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the callback function and callback data used by the UBA
+ * implementation for Bidi class determination.
+ * <p>This may be useful for assigning Bidi classes to PUA characters, or
+ * for special application needs. For instance, an application may want to
+ * handle all spaces like L or R characters (according to the base direction)
+ * when creating the visual ordering of logical lines which are part of a report
+ * organized in columns: there should not be interaction between adjacent
+ * cells.<p>
+ *
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
+ *
+ * @param newFn is the new callback function pointer.
+ *
+ * @param newContext is the new callback context pointer. This can be NULL.
+ *
+ * @param oldFn fillin: Returns the old callback function pointer. This can be
+ *                      NULL.
+ *
+ * @param oldContext fillin: Returns the old callback's context. This can be
+ *                           NULL.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @see ubidi_getClassCallback
+ * @stable ICU 3.6
+ */
+U_STABLE void U_EXPORT2
+ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn,
+                       const void *newContext, UBiDiClassCallback **oldFn,
+                       const void **oldContext, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the current callback function used for Bidi class determination.
+ *
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
+ *
+ * @param fn fillin: Returns the callback function pointer.
+ *
+ * @param context fillin: Returns the callback's private context.
+ *
+ * @see ubidi_setClassCallback
+ * @stable ICU 3.6
+ */
+U_STABLE void U_EXPORT2
+ubidi_getClassCallback(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Take a <code>UBiDi</code> object containing the reordering
+ * information for a piece of text (one or more paragraphs) set by
+ * <code>ubidi_setPara()</code> or for a line of text set by
+ * <code>ubidi_setLine()</code> and write a reordered string to the
+ * destination buffer.
+ *
+ * This function preserves the integrity of characters with multiple
+ * code units and (optionally) combining characters.
+ * Characters in RTL runs can be replaced by mirror-image characters
+ * in the destination buffer. Note that "real" mirroring has
+ * to be done in a rendering engine by glyph selection
+ * and that for many "mirrored" characters there are no
+ * Unicode characters as mirror-image equivalents.
+ * There are also options to insert or remove Bidi control
+ * characters; see the description of the <code>destSize</code>
+ * and <code>options</code> parameters and of the option bit flags.
+ *
+ * @param pBiDi A pointer to a <code>UBiDi</code> object that
+ *              is set by <code>ubidi_setPara()</code> or
+ *              <code>ubidi_setLine()</code> and contains the reordering
+ *              information for the text that it was defined for,
+ *              as well as a pointer to that text.<br><br>
+ *              The text was aliased (only the pointer was stored
+ *              without copying the contents) and must not have been modified
+ *              since the <code>ubidi_setPara()</code> call.
+ *
+ * @param dest A pointer to where the reordered text is to be copied.
+ *             The source text and <code>dest[destSize]</code>
+ *             must not overlap.
+ *
+ * @param destSize The size of the <code>dest</code> buffer,
+ *                 in number of UChars.
+ *                 If the <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>
+ *                 option is set, then the destination length could be
+ *                 as large as
+ *                 <code>ubidi_getLength(pBiDi)+2*ubidi_countRuns(pBiDi)</code>.
+ *                 If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option
+ *                 is set, then the destination length may be less than
+ *                 <code>ubidi_getLength(pBiDi)</code>.
+ *                 If none of these options is set, then the destination length
+ *                 will be exactly <code>ubidi_getProcessedLength(pBiDi)</code>.
+ *
+ * @param options A bit set of options for the reordering that control
+ *                how the reordered text is written.
+ *                The options include mirroring the characters on a code
+ *                point basis and inserting LRM characters, which is used
+ *                especially for transforming visually stored text
+ *                to logically stored text (although this is still an
+ *                imperfect implementation of an "inverse Bidi" algorithm
+ *                because it uses the "forward Bidi" algorithm at its core).
+ *                The available options are:
+ *                <code>#UBIDI_DO_MIRRORING</code>,
+ *                <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
+ *                <code>#UBIDI_KEEP_BASE_COMBINING</code>,
+ *                <code>#UBIDI_OUTPUT_REVERSE</code>,
+ *                <code>#UBIDI_REMOVE_BIDI_CONTROLS</code>
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The length of the output string.
+ *
+ * @see ubidi_getProcessedLength
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_writeReordered(UBiDi *pBiDi,
+                     UChar *dest, int32_t destSize,
+                     uint16_t options,
+                     UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Reverse a Right-To-Left run of Unicode text.
+ *
+ * This function preserves the integrity of characters with multiple
+ * code units and (optionally) combining characters.
+ * Characters can be replaced by mirror-image characters
+ * in the destination buffer. Note that "real" mirroring has
+ * to be done in a rendering engine by glyph selection
+ * and that for many "mirrored" characters there are no
+ * Unicode characters as mirror-image equivalents.
+ * There are also options to insert or remove Bidi control
+ * characters.
+ *
+ * This function is the implementation for reversing RTL runs as part
+ * of <code>ubidi_writeReordered()</code>. For detailed descriptions
+ * of the parameters, see there.
+ * Since no Bidi controls are inserted here, the output string length
+ * will never exceed <code>srcLength</code>.
+ *
+ * @see ubidi_writeReordered
+ *
+ * @param src A pointer to the RTL run text.
+ *
+ * @param srcLength The length of the RTL run.
+ *
+ * @param dest A pointer to where the reordered text is to be copied.
+ *             <code>src[srcLength]</code> and <code>dest[destSize]</code>
+ *             must not overlap.
+ *
+ * @param destSize The size of the <code>dest</code> buffer,
+ *                 in number of UChars.
+ *                 If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option
+ *                 is set, then the destination length may be less than
+ *                 <code>srcLength</code>.
+ *                 If this option is not set, then the destination length
+ *                 will be exactly <code>srcLength</code>.
+ *
+ * @param options A bit set of options for the reordering that control
+ *                how the reordered text is written.
+ *                See the <code>options</code> parameter in <code>ubidi_writeReordered()</code>.
+ *
+ * @param pErrorCode must be a valid pointer to an error code value.
+ *
+ * @return The length of the output string.
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubidi_writeReverse(const UChar *src, int32_t srcLength,
+                   UChar *dest, int32_t destSize,
+                   uint16_t options,
+                   UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/*#define BIDI_SAMPLE_CODE*/
+/*@}*/
+
+#endif
diff --git a/libicu/ndk_headers/unicode/ubrk.h b/libicu/ndk_headers/unicode/ubrk.h
new file mode 100644
index 0000000..92cd9f0
--- /dev/null
+++ b/libicu/ndk_headers/unicode/ubrk.h
@@ -0,0 +1,561 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+******************************************************************************
+* Copyright (C) 1996-2015, International Business Machines Corporation and others.
+* All Rights Reserved.
+******************************************************************************
+*/
+
+#ifndef UBRK_H
+#define UBRK_H
+
+#include "unicode/utypes.h"
+#include "unicode/uloc.h"
+#include "unicode/utext.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif   // U_SHOW_CPLUSPLUS_API
+
+/**
+ * A text-break iterator.
+ *  For usage in C programs.
+ */
+#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
+#   define UBRK_TYPEDEF_UBREAK_ITERATOR
+    /**
+     *  Opaque type representing an ICU Break iterator object.
+     *  @stable ICU 2.0
+     */
+    typedef struct UBreakIterator UBreakIterator;
+#endif
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+
+/**
+ * \file
+ * \brief C API: BreakIterator
+ *
+ * <h2> BreakIterator C API </h2>
+ *
+ * The BreakIterator C API defines  methods for finding the location
+ * of boundaries in text. Pointer to a UBreakIterator maintain a
+ * current position and scan over text returning the index of characters
+ * where boundaries occur.
+ * <p>
+ * Line boundary analysis determines where a text string can be broken
+ * when line-wrapping. The mechanism correctly handles punctuation and
+ * hyphenated words.
+ * <p>
+ * Note: The locale keyword "lb" can be used to modify line break
+ * behavior according to the CSS level 3 line-break options, see
+ * <http://dev.w3.org/csswg/css-text/#line-breaking>. For example:
+ * "ja@lb=strict", "zh@lb=loose".
+ * <p>
+ * Sentence boundary analysis allows selection with correct
+ * interpretation of periods within numbers and abbreviations, and
+ * trailing punctuation marks such as quotation marks and parentheses.
+ * <p>
+ * Note: The locale keyword "ss" can be used to enable use of
+ * segmentation suppression data (preventing breaks in English after
+ * abbreviations such as "Mr." or "Est.", for example), as follows:
+ * "en@ss=standard".
+ * <p>
+ * Word boundary analysis is used by search and replace functions, as
+ * well as within text editing applications that allow the user to
+ * select words with a double click. Word selection provides correct
+ * interpretation of punctuation marks within and following
+ * words. Characters that are not part of a word, such as symbols or
+ * punctuation marks, have word-breaks on both sides.
+ * <p>
+ * Character boundary analysis identifies the boundaries of
+ * "Extended Grapheme Clusters", which are groupings of codepoints
+ * that should be treated as character-like units for many text operations.
+ * Please see Unicode Standard Annex #29, Unicode Text Segmentation,
+ * http://www.unicode.org/reports/tr29/ for additional information
+ * on grapheme clusters and guidelines on their use.
+ * <p>
+ * Title boundary analysis locates all positions,
+ * typically starts of words, that should be set to Title Case
+ * when title casing the text.
+ * <p>
+ * The text boundary positions are found according to the rules
+ * described in Unicode Standard Annex #29, Text Boundaries, and
+ * Unicode Standard Annex #14, Line Breaking Properties.  These
+ * are available at http://www.unicode.org/reports/tr14/ and
+ * http://www.unicode.org/reports/tr29/.
+ * <p>
+ * In addition to the plain C API defined in this header file, an
+ * object oriented C++ API with equivalent functionality is defined in the
+ * file brkiter.h.
+ * <p>
+ * Code snippets illustrating the use of the Break Iterator APIs
+ * are available in the ICU User Guide,
+ * http://icu-project.org/userguide/boundaryAnalysis.html
+ * and in the sample program icu/source/samples/break/break.cpp
+ */
+
+/** The possible types of text boundaries.  @stable ICU 2.0 */
+typedef enum UBreakIteratorType {
+  /** Character breaks  @stable ICU 2.0 */
+  UBRK_CHARACTER = 0,
+  /** Word breaks @stable ICU 2.0 */
+  UBRK_WORD = 1,
+  /** Line breaks @stable ICU 2.0 */
+  UBRK_LINE = 2,
+  /** Sentence breaks @stable ICU 2.0 */
+  UBRK_SENTENCE = 3,
+
+#ifndef U_HIDE_DEPRECATED_API
+  /**
+   * Title Case breaks
+   * The iterator created using this type locates title boundaries as described for
+   * Unicode 3.2 only. For Unicode 4.0 and above title boundary iteration,
+   * please use Word Boundary iterator.
+   *
+   * @deprecated ICU 2.8 Use the word break iterator for titlecasing for Unicode 4 and later.
+   */
+  UBRK_TITLE = 4,
+    /**
+     * One more than the highest normal UBreakIteratorType value.
+     * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
+     */
+    UBRK_COUNT = 5
+#endif  // U_HIDE_DEPRECATED_API
+} UBreakIteratorType;
+
+/** Value indicating all text boundaries have been returned.
+ *  @stable ICU 2.0
+ */
+#define UBRK_DONE ((int32_t) -1)
+
+
+/**
+ *  Enum constants for the word break tags returned by
+ *  getRuleStatus().  A range of values is defined for each category of
+ *  word, to allow for further subdivisions of a category in future releases.
+ *  Applications should check for tag values falling within the range, rather
+ *  than for single individual values.
+ *
+ * The numeric values of all of these constants are stable (will not change).
+ *
+ * @stable ICU 2.2
+*/
+typedef enum UWordBreak {
+    /** Tag value for "words" that do not fit into any of other categories.
+     *  Includes spaces and most punctuation. */
+    UBRK_WORD_NONE           = 0,
+    /** Upper bound for tags for uncategorized words. */
+    UBRK_WORD_NONE_LIMIT     = 100,
+    /** Tag value for words that appear to be numbers, lower limit.    */
+    UBRK_WORD_NUMBER         = 100,
+    /** Tag value for words that appear to be numbers, upper limit.    */
+    UBRK_WORD_NUMBER_LIMIT   = 200,
+    /** Tag value for words that contain letters, excluding
+     *  hiragana, katakana or ideographic characters, lower limit.    */
+    UBRK_WORD_LETTER         = 200,
+    /** Tag value for words containing letters, upper limit  */
+    UBRK_WORD_LETTER_LIMIT   = 300,
+    /** Tag value for words containing kana characters, lower limit */
+    UBRK_WORD_KANA           = 300,
+    /** Tag value for words containing kana characters, upper limit */
+    UBRK_WORD_KANA_LIMIT     = 400,
+    /** Tag value for words containing ideographic characters, lower limit */
+    UBRK_WORD_IDEO           = 400,
+    /** Tag value for words containing ideographic characters, upper limit */
+    UBRK_WORD_IDEO_LIMIT     = 500
+} UWordBreak;
+
+/**
+ *  Enum constants for the line break tags returned by getRuleStatus().
+ *  A range of values is defined for each category of
+ *  word, to allow for further subdivisions of a category in future releases.
+ *  Applications should check for tag values falling within the range, rather
+ *  than for single individual values.
+ *
+ * The numeric values of all of these constants are stable (will not change).
+ *
+ * @stable ICU 2.8
+*/
+typedef enum ULineBreakTag {
+    /** Tag value for soft line breaks, positions at which a line break
+      *  is acceptable but not required                */
+    UBRK_LINE_SOFT            = 0,
+    /** Upper bound for soft line breaks.              */
+    UBRK_LINE_SOFT_LIMIT      = 100,
+    /** Tag value for a hard, or mandatory line break  */
+    UBRK_LINE_HARD            = 100,
+    /** Upper bound for hard line breaks.              */
+    UBRK_LINE_HARD_LIMIT      = 200
+} ULineBreakTag;
+
+
+
+/**
+ *  Enum constants for the sentence break tags returned by getRuleStatus().
+ *  A range of values is defined for each category of
+ *  sentence, to allow for further subdivisions of a category in future releases.
+ *  Applications should check for tag values falling within the range, rather
+ *  than for single individual values.
+ *
+ * The numeric values of all of these constants are stable (will not change).
+ *
+ * @stable ICU 2.8
+*/
+typedef enum USentenceBreakTag {
+    /** Tag value for for sentences  ending with a sentence terminator
+      * ('.', '?', '!', etc.) character, possibly followed by a
+      * hard separator (CR, LF, PS, etc.)
+      */
+    UBRK_SENTENCE_TERM       = 0,
+    /** Upper bound for tags for sentences ended by sentence terminators.    */
+    UBRK_SENTENCE_TERM_LIMIT = 100,
+    /** Tag value for for sentences that do not contain an ending
+      * sentence terminator ('.', '?', '!', etc.) character, but
+      * are ended only by a hard separator (CR, LF, PS, etc.) or end of input.
+      */
+    UBRK_SENTENCE_SEP        = 100,
+    /** Upper bound for tags for sentences ended by a separator.              */
+    UBRK_SENTENCE_SEP_LIMIT  = 200
+    /** Tag value for a hard, or mandatory line break  */
+} USentenceBreakTag;
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Open a new UBreakIterator for locating text boundaries for a specified locale.
+ * A UBreakIterator may be used for detecting character, line, word,
+ * and sentence breaks in text.
+ * @param type The type of UBreakIterator to open: one of UBRK_CHARACTER, UBRK_WORD,
+ * UBRK_LINE, UBRK_SENTENCE
+ * @param locale The locale specifying the text-breaking conventions. Note that
+ * locale keys such as "lb" and "ss" may be used to modify text break behavior,
+ * see general discussion of BreakIterator C API.
+ * @param text The text to be iterated over. May be null, in which case ubrk_setText() is
+ *        used to specify the text to be iterated.
+ * @param textLength The number of characters in text, or -1 if null-terminated.
+ * @param status A UErrorCode to receive any errors.
+ * @return A UBreakIterator for the specified locale.
+ * @see ubrk_openRules
+ * @stable ICU 2.0
+ */
+U_STABLE UBreakIterator* U_EXPORT2
+ubrk_open(UBreakIteratorType type,
+      const char *locale,
+      const UChar *text,
+      int32_t textLength,
+      UErrorCode *status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+
+
+
+
+#ifndef U_HIDE_DEPRECATED_API
+
+/**
+  * A recommended size (in bytes) for the memory buffer to be passed to ubrk_saveClone().
+  * @deprecated ICU 52. Do not rely on ubrk_safeClone() cloning into any provided buffer.
+  */
+#define U_BRK_SAFECLONE_BUFFERSIZE 1
+
+#endif /* U_HIDE_DEPRECATED_API */
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+* Close a UBreakIterator.
+* Once closed, a UBreakIterator may no longer be used.
+* @param bi The break iterator to close.
+ * @stable ICU 2.0
+*/
+U_STABLE void U_EXPORT2
+ubrk_close(UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUBreakIteratorPointer
+ * "Smart pointer" class, closes a UBreakIterator via ubrk_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUBreakIteratorPointer, UBreakIterator, ubrk_close);
+
+U_NAMESPACE_END
+
+#endif
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Sets an existing iterator to point to a new piece of text.
+ * The break iterator retains a pointer to the supplied text.
+ * The caller must not modify or delete the text while the BreakIterator
+ * retains the reference.
+ *
+ * @param bi The iterator to use
+ * @param text The text to be set
+ * @param textLength The length of the text
+ * @param status The error code
+ * @stable ICU 2.0
+ */
+U_STABLE void U_EXPORT2
+ubrk_setText(UBreakIterator* bi,
+             const UChar*    text,
+             int32_t         textLength,
+             UErrorCode*     status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Sets an existing iterator to point to a new piece of text.
+ *
+ * All index positions returned by break iterator functions are
+ * native indices from the UText. For example, when breaking UTF-8
+ * encoded text, the break positions returned by \ref ubrk_next, \ref ubrk_previous, etc.
+ * will be UTF-8 string indices, not UTF-16 positions.
+ *
+ * @param bi The iterator to use
+ * @param text The text to be set.
+ *             This function makes a shallow clone of the supplied UText.  This means
+ *             that the caller is free to immediately close or otherwise reuse the
+ *             UText that was passed as a parameter, but that the underlying text itself
+ *             must not be altered while being referenced by the break iterator.
+ * @param status The error code
+ * @stable ICU 3.4
+ */
+U_STABLE void U_EXPORT2
+ubrk_setUText(UBreakIterator* bi,
+             UText*          text,
+             UErrorCode*     status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Determine the most recently-returned text boundary.
+ *
+ * @param bi The break iterator to use.
+ * @return The character index most recently returned by \ref ubrk_next, \ref ubrk_previous,
+ * \ref ubrk_first, or \ref ubrk_last.
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_current(const UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Advance the iterator to the boundary following the current boundary.
+ *
+ * @param bi The break iterator to use.
+ * @return The character index of the next text boundary, or UBRK_DONE
+ * if all text boundaries have been returned.
+ * @see ubrk_previous
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_next(UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the iterator position to the boundary preceding the current boundary.
+ *
+ * @param bi The break iterator to use.
+ * @return The character index of the preceding text boundary, or UBRK_DONE
+ * if all text boundaries have been returned.
+ * @see ubrk_next
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_previous(UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the iterator position to zero, the start of the text being scanned.
+ * @param bi The break iterator to use.
+ * @return The new iterator position (zero).
+ * @see ubrk_last
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_first(UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned.
+ * This is not the same as the last character.
+ * @param bi The break iterator to use.
+ * @return The character offset immediately <EM>beyond</EM> the last character in the
+ * text being scanned.
+ * @see ubrk_first
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_last(UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the iterator position to the first boundary preceding the specified offset.
+ * The new position is always smaller than offset, or UBRK_DONE.
+ * @param bi The break iterator to use.
+ * @param offset The offset to begin scanning.
+ * @return The text boundary preceding offset, or UBRK_DONE.
+ * @see ubrk_following
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_preceding(UBreakIterator *bi,
+           int32_t offset) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Advance the iterator to the first boundary following the specified offset.
+ * The value returned is always greater than offset, or UBRK_DONE.
+ * @param bi The break iterator to use.
+ * @param offset The offset to begin scanning.
+ * @return The text boundary following offset, or UBRK_DONE.
+ * @see ubrk_preceding
+ * @stable ICU 2.0
+ */
+U_STABLE int32_t U_EXPORT2
+ubrk_following(UBreakIterator *bi,
+           int32_t offset) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+* Get a locale for which text breaking information is available.
+* A UBreakIterator in a locale returned by this function will perform the correct
+* text breaking for the locale.
+* @param index The index of the desired locale.
+* @return A locale for which number text breaking information is available, or 0 if none.
+* @see ubrk_countAvailable
+* @stable ICU 2.0
+*/
+U_STABLE const char* U_EXPORT2
+ubrk_getAvailable(int32_t index) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+* Determine how many locales have text breaking information available.
+* This function is most useful as determining the loop ending condition for
+* calls to \ref ubrk_getAvailable.
+* @return The number of locales for which text breaking information is available.
+* @see ubrk_getAvailable
+* @stable ICU 2.0
+*/
+U_STABLE int32_t U_EXPORT2
+ubrk_countAvailable(void) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+* Returns true if the specified position is a boundary position.  As a side
+* effect, leaves the iterator pointing to the first boundary position at
+* or after "offset".
+* @param bi The break iterator to use.
+* @param offset the offset to check.
+* @return True if "offset" is a boundary position.
+* @stable ICU 2.0
+*/
+U_STABLE  UBool U_EXPORT2
+ubrk_isBoundary(UBreakIterator *bi, int32_t offset) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Return the status from the break rule that determined the most recently
+ * returned break position.  The values appear in the rule source
+ * within brackets, {123}, for example.  For rules that do not specify a
+ * status, a default value of 0 is returned.
+ * <p>
+ * For word break iterators, the possible values are defined in enum UWordBreak.
+ * @stable ICU 2.2
+ */
+U_STABLE  int32_t U_EXPORT2
+ubrk_getRuleStatus(UBreakIterator *bi) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the statuses from the break rules that determined the most recently
+ * returned break position.  The values appear in the rule source
+ * within brackets, {123}, for example.  The default status value for rules
+ * that do not explicitly provide one is zero.
+ * <p>
+ * For word break iterators, the possible values are defined in enum UWordBreak.
+ * @param bi        The break iterator to use
+ * @param fillInVec an array to be filled in with the status values.
+ * @param capacity  the length of the supplied vector.  A length of zero causes
+ *                  the function to return the number of status values, in the
+ *                  normal way, without attempting to store any values.
+ * @param status    receives error codes.
+ * @return          The number of rule status values from rules that determined
+ *                  the most recent boundary returned by the break iterator.
+ * @stable ICU 3.0
+ */
+U_STABLE  int32_t U_EXPORT2
+ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity, UErrorCode *status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+
+
+
+
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+
+#endif
diff --git a/libicu/ndk_headers/unicode/udisplaycontext.h b/libicu/ndk_headers/unicode/udisplaycontext.h
new file mode 100644
index 0000000..398481c
--- /dev/null
+++ b/libicu/ndk_headers/unicode/udisplaycontext.h
@@ -0,0 +1,172 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*****************************************************************************************
+* Copyright (C) 2014-2016, International Business Machines
+* Corporation and others. All Rights Reserved.
+*****************************************************************************************
+*/
+
+#ifndef UDISPLAYCONTEXT_H
+#define UDISPLAYCONTEXT_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C API: Display context types (enum values)
+ */
+
+/**
+ * Display context types, for getting values of a particular setting.
+ * Note, the specific numeric values are internal and may change.
+ * @stable ICU 51
+ */
+enum UDisplayContextType {
+    /**
+     * Type to retrieve the dialect handling setting, e.g.
+     * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
+     * @stable ICU 51
+     */
+    UDISPCTX_TYPE_DIALECT_HANDLING = 0,
+    /**
+     * Type to retrieve the capitalization context setting, e.g.
+     * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
+     * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
+     * @stable ICU 51
+     */
+    UDISPCTX_TYPE_CAPITALIZATION = 1,
+    /**
+     * Type to retrieve the display length setting, e.g.
+     * UDISPCTX_LENGTH_FULL, UDISPCTX_LENGTH_SHORT.
+     * @stable ICU 54
+     */
+    UDISPCTX_TYPE_DISPLAY_LENGTH = 2,
+    /**
+     * Type to retrieve the substitute handling setting, e.g.
+     * UDISPCTX_SUBSTITUTE, UDISPCTX_NO_SUBSTITUTE.
+     * @stable ICU 58
+     */
+    UDISPCTX_TYPE_SUBSTITUTE_HANDLING = 3
+};
+/**
+*  @stable ICU 51
+*/
+typedef enum UDisplayContextType UDisplayContextType;
+
+/**
+ * Display context settings.
+ * Note, the specific numeric values are internal and may change.
+ * @stable ICU 51
+ */
+enum UDisplayContext {
+    /**
+     * ================================
+     * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
+     * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
+     * to get the value.
+     */
+    /**
+     * A possible setting for DIALECT_HANDLING:
+     * use standard names when generating a locale name,
+     * e.g. en_GB displays as 'English (United Kingdom)'.
+     * @stable ICU 51
+     */
+    UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
+    /**
+     * A possible setting for DIALECT_HANDLING:
+     * use dialect names, when generating a locale name,
+     * e.g. en_GB displays as 'British English'.
+     * @stable ICU 51
+     */
+    UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
+    /**
+     * ================================
+     * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
+     * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
+     * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
+     * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
+     * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
+     * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
+     */
+    /**
+     * The capitalization context to be used is unknown (this is the default value).
+     * @stable ICU 51
+     */
+    UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
+    /**
+     * The capitalization context if a date, date symbol or display name is to be
+     * formatted with capitalization appropriate for the middle of a sentence.
+     * @stable ICU 51
+     */
+    UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
+    /**
+     * The capitalization context if a date, date symbol or display name is to be
+     * formatted with capitalization appropriate for the beginning of a sentence.
+     * @stable ICU 51
+     */
+    UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
+    /**
+     * The capitalization context if a date, date symbol or display name is to be
+     * formatted with capitalization appropriate for a user-interface list or menu item.
+     * @stable ICU 51
+     */
+    UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
+    /**
+     * The capitalization context if a date, date symbol or display name is to be
+     * formatted with capitalization appropriate for stand-alone usage such as an
+     * isolated name on a calendar page.
+     * @stable ICU 51
+     */
+    UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4,
+    /**
+     * ================================
+     * DISPLAY_LENGTH can be set to one of UDISPCTX_LENGTH_FULL or
+     * UDISPCTX_LENGTH_SHORT. Use UDisplayContextType UDISPCTX_TYPE_DISPLAY_LENGTH
+     * to get the value.
+     */
+    /**
+     * A possible setting for DISPLAY_LENGTH:
+     * use full names when generating a locale name,
+     * e.g. "United States" for US.
+     * @stable ICU 54
+     */
+    UDISPCTX_LENGTH_FULL = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 0,
+    /**
+     * A possible setting for DISPLAY_LENGTH:
+     * use short names when generating a locale name,
+     * e.g. "U.S." for US.
+     * @stable ICU 54
+     */
+    UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1,
+    /**
+     * ================================
+     * SUBSTITUTE_HANDLING can be set to one of UDISPCTX_SUBSTITUTE or
+     * UDISPCTX_NO_SUBSTITUTE. Use UDisplayContextType UDISPCTX_TYPE_SUBSTITUTE_HANDLING
+     * to get the value.
+     */
+    /**
+     * A possible setting for SUBSTITUTE_HANDLING:
+     * Returns a fallback value (e.g., the input code) when no data is available.
+     * This is the default value.
+     * @stable ICU 58
+     */
+    UDISPCTX_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 0,
+    /**
+     * A possible setting for SUBSTITUTE_HANDLING:
+     * Returns a null value when no data is available.
+     * @stable ICU 58
+     */
+    UDISPCTX_NO_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 1
+
+};
+/**
+*  @stable ICU 51
+*/
+typedef enum UDisplayContext UDisplayContext;
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/libicu/ndk_headers/unicode/uenum.h b/libicu/ndk_headers/unicode/uenum.h
index cbb3943..64a9467 100644
--- a/libicu/ndk_headers/unicode/uenum.h
+++ b/libicu/ndk_headers/unicode/uenum.h
@@ -43,7 +43,19 @@
 /** structure representing an enumeration object instance @stable ICU 2.2 */
 typedef struct UEnumeration UEnumeration;
 
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+/**
+ * Disposes of resources in use by the iterator.  If en is NULL,
+ * does nothing.  After this call, any char* or UChar* pointer
+ * returned by uenum_unext() or uenum_next() is invalid.
+ * @param en UEnumeration structure pointer
+ * @stable ICU 2.2
+ */
+U_STABLE void U_EXPORT2
+uenum_close(UEnumeration* en) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
 #if U_SHOW_CPLUSPLUS_API
 
@@ -64,13 +76,109 @@
 
 #endif
 
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+/**
+ * Returns the number of elements that the iterator traverses.  If
+ * the iterator is out-of-sync with its service, status is set to
+ * U_ENUM_OUT_OF_SYNC_ERROR.
+ * This is a convenience function. It can end up being very
+ * expensive as all the items might have to be pre-fetched (depending
+ * on the type of data being traversed). Use with caution and only 
+ * when necessary.
+ * @param en UEnumeration structure pointer
+ * @param status error code, can be U_ENUM_OUT_OF_SYNC_ERROR if the
+ *               iterator is out of sync.
+ * @return number of elements in the iterator
+ * @stable ICU 2.2
+ */
+U_STABLE int32_t U_EXPORT2
+uenum_count(UEnumeration* en, UErrorCode* status) __INTRODUCED_IN(31);
 
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+/**
+ * Returns the next element in the iterator's list.  If there are
+ * no more elements, returns NULL.  If the iterator is out-of-sync
+ * with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and
+ * NULL is returned.  If the native service string is a char* string,
+ * it is converted to UChar* with the invariant converter.
+ * The result is terminated by (UChar)0.
+ * @param en the iterator object
+ * @param resultLength pointer to receive the length of the result
+ *                     (not including the terminating \\0).
+ *                     If the pointer is NULL it is ignored.
+ * @param status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if
+ *               the iterator is out of sync with its service.
+ * @return a pointer to the string.  The string will be
+ *         zero-terminated.  The return pointer is owned by this iterator
+ *         and must not be deleted by the caller.  The pointer is valid
+ *         until the next call to any uenum_... method, including
+ *         uenum_next() or uenum_unext().  When all strings have been
+ *         traversed, returns NULL.
+ * @stable ICU 2.2
+ */
+U_STABLE const UChar* U_EXPORT2
+uenum_unext(UEnumeration* en,
+            int32_t* resultLength,
+            UErrorCode* status) __INTRODUCED_IN(31);
 
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+/**
+ * Returns the next element in the iterator's list.  If there are
+ * no more elements, returns NULL.  If the iterator is out-of-sync
+ * with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and
+ * NULL is returned.  If the native service string is a UChar*
+ * string, it is converted to char* with the invariant converter.
+ * The result is terminated by (char)0.  If the conversion fails
+ * (because a character cannot be converted) then status is set to
+ * U_INVARIANT_CONVERSION_ERROR and the return value is undefined
+ * (but non-NULL).
+ * @param en the iterator object
+ * @param resultLength pointer to receive the length of the result
+ *                     (not including the terminating \\0).
+ *                     If the pointer is NULL it is ignored.
+ * @param status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if
+ *               the iterator is out of sync with its service.  Set to
+ *               U_INVARIANT_CONVERSION_ERROR if the underlying native string is
+ *               UChar* and conversion to char* with the invariant converter
+ *               fails. This error pertains only to current string, so iteration
+ *               might be able to continue successfully.
+ * @return a pointer to the string.  The string will be
+ *         zero-terminated.  The return pointer is owned by this iterator
+ *         and must not be deleted by the caller.  The pointer is valid
+ *         until the next call to any uenum_... method, including
+ *         uenum_next() or uenum_unext().  When all strings have been
+ *         traversed, returns NULL.
+ * @stable ICU 2.2
+ */
+U_STABLE const char* U_EXPORT2
+uenum_next(UEnumeration* en,
+           int32_t* resultLength,
+           UErrorCode* status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Resets the iterator to the current list of service IDs.  This
+ * re-establishes sync with the service and rewinds the iterator
+ * to start at the first element.
+ * @param en the iterator object
+ * @param status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if
+ *               the iterator is out of sync with its service.  
+ * @stable ICU 2.2
+ */
+U_STABLE void U_EXPORT2
+uenum_reset(UEnumeration* en, UErrorCode* status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
 #if U_SHOW_CPLUSPLUS_API
 
@@ -78,8 +186,42 @@
 
 #endif
 
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+/**
+ * Given an array of const UChar* strings, return a UEnumeration.  String pointers from 0..count-1 must not be null.
+ * Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close.
+ * \snippet test/cintltst/uenumtst.c uenum_openUCharStringsEnumeration
+ * @param strings array of const UChar* strings (each null terminated). All storage is owned by the caller.
+ * @param count length of the array
+ * @param ec error code
+ * @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory.
+ * @see uenum_close
+ * @stable ICU 50
+ */
+U_STABLE UEnumeration* U_EXPORT2
+uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
+                                 UErrorCode* ec) __INTRODUCED_IN(31);
 
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Given an array of const char* strings (invariant chars only), return a UEnumeration.  String pointers from 0..count-1 must not be null.
+ * Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close.
+ * \snippet test/cintltst/uenumtst.c uenum_openCharStringsEnumeration
+ * @param strings array of char* strings (each null terminated).  All storage is owned by the caller.
+ * @param count length of the array
+ * @param ec error code
+ * @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory
+ * @see uenum_close
+ * @stable ICU 50
+ */
+U_STABLE UEnumeration* U_EXPORT2
+uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
+                                 UErrorCode* ec) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
 
 #endif
diff --git a/libicu/ndk_headers/unicode/uldnames.h b/libicu/ndk_headers/unicode/uldnames.h
new file mode 100644
index 0000000..68d2b8d
--- /dev/null
+++ b/libicu/ndk_headers/unicode/uldnames.h
@@ -0,0 +1,363 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*******************************************************************************
+*   Copyright (C) 2010-2016, International Business Machines Corporation and
+*   others.  All Rights Reserved.
+*******************************************************************************
+*/
+
+#ifndef __ULDNAMES_H__
+#define __ULDNAMES_H__
+
+/**
+ * \file
+ * \brief C API: Provides display names of Locale ids and their components.
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/uscript.h"
+#include "unicode/udisplaycontext.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif   // U_SHOW_CPLUSPLUS_API
+
+/**
+ * Enum used in LocaleDisplayNames::createInstance.
+ * @stable ICU 4.4
+ */
+typedef enum {
+    /**
+     * Use standard names when generating a locale name,
+     * e.g. en_GB displays as 'English (United Kingdom)'.
+     * @stable ICU 4.4
+     */
+    ULDN_STANDARD_NAMES = 0,
+    /**
+     * Use dialect names, when generating a locale name,
+     * e.g. en_GB displays as 'British English'.
+     * @stable ICU 4.4
+     */
+    ULDN_DIALECT_NAMES
+} UDialectHandling;
+
+/**
+ * Opaque C service object type for the locale display names API
+ * @stable ICU 4.4
+ */
+struct ULocaleDisplayNames;
+
+/** 
+ * C typedef for struct ULocaleDisplayNames. 
+ * @stable ICU 4.4 
+ */
+typedef struct ULocaleDisplayNames ULocaleDisplayNames;  
+
+#if !UCONFIG_NO_FORMATTING
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns an instance of LocaleDisplayNames that returns names
+ * formatted for the provided locale, using the provided
+ * dialectHandling.  The usual value for dialectHandling is
+ * ULOC_STANDARD_NAMES.
+ *
+ * @param locale the display locale 
+ * @param dialectHandling how to select names for locales 
+ * @return a ULocaleDisplayNames instance 
+ * @param pErrorCode the status code
+ * @stable ICU 4.4
+ */
+U_STABLE ULocaleDisplayNames * U_EXPORT2
+uldn_open(const char * locale,
+          UDialectHandling dialectHandling,
+          UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Closes a ULocaleDisplayNames instance obtained from uldn_open().
+ * @param ldn the ULocaleDisplayNames instance to be closed
+ * @stable ICU 4.4
+ */
+U_STABLE void U_EXPORT2
+uldn_close(ULocaleDisplayNames *ldn) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalULocaleDisplayNamesPointer
+ * "Smart pointer" class, closes a ULocaleDisplayNames via uldn_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDisplayNamesPointer, ULocaleDisplayNames, uldn_close);
+
+U_NAMESPACE_END
+
+#endif
+
+/* getters for state */
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the locale used to determine the display names. This is
+ * not necessarily the same locale passed to {@link #uldn_open}.
+ * @param ldn the LocaleDisplayNames instance
+ * @return the display locale 
+ * @stable ICU 4.4
+ */
+U_STABLE const char * U_EXPORT2
+uldn_getLocale(const ULocaleDisplayNames *ldn) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the dialect handling used in the display names.
+ * @param ldn the LocaleDisplayNames instance
+ * @return the dialect handling enum
+ * @stable ICU 4.4
+ */
+U_STABLE UDialectHandling U_EXPORT2
+uldn_getDialectHandling(const ULocaleDisplayNames *ldn) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/* names for entire locales */
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided locale.
+ * @param ldn the LocaleDisplayNames instance
+ * @param locale the locale whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
+                       const char *locale,
+                       UChar *result,
+                       int32_t maxResultSize,
+                       UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/* names for components of a locale */
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided language code.
+ * @param ldn the LocaleDisplayNames instance
+ * @param lang the language code whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
+                         const char *lang,
+                         UChar *result,
+                         int32_t maxResultSize,
+                         UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided script.
+ * @param ldn the LocaleDisplayNames instance
+ * @param script the script whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
+                       const char *script,
+                       UChar *result,
+                       int32_t maxResultSize,
+                       UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided script code.
+ * @param ldn the LocaleDisplayNames instance
+ * @param scriptCode the script code whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
+                           UScriptCode scriptCode,
+                           UChar *result,
+                           int32_t maxResultSize,
+                           UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided region code.
+ * @param ldn the LocaleDisplayNames instance
+ * @param region the region code whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
+                       const char *region,
+                       UChar *result,
+                       int32_t maxResultSize,
+                       UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided variant
+ * @param ldn the LocaleDisplayNames instance
+ * @param variant the variant whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
+                        const char *variant,
+                        UChar *result,
+                        int32_t maxResultSize,
+                        UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided locale key
+ * @param ldn the LocaleDisplayNames instance
+ * @param key the locale key whose display name to return
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
+                    const char *key,
+                    UChar *result,
+                    int32_t maxResultSize,
+                    UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the display name of the provided value (used with the provided key).
+ * @param ldn the LocaleDisplayNames instance
+ * @param key the locale key
+ * @param value the locale key's value
+ * @param result receives the display name
+ * @param maxResultSize the size of the result buffer
+ * @param pErrorCode the status code
+ * @return the actual buffer size needed for the display name.  If it's
+ * greater than maxResultSize, the returned name will be truncated.
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
+                         const char *key,
+                         const char *value,
+                         UChar *result,
+                         int32_t maxResultSize,
+                         UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+* Returns an instance of LocaleDisplayNames that returns names formatted
+* for the provided locale, using the provided UDisplayContext settings.
+*
+* @param locale The display locale 
+* @param contexts List of one or more context settings (e.g. for dialect
+*               handling, capitalization, etc.
+* @param length Number of items in the contexts list
+* @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates
+*               a failure status, the function will do nothing; otherwise this will be
+*               updated with any new status from the function. 
+* @return a ULocaleDisplayNames instance 
+* @stable ICU 51
+*/
+U_STABLE ULocaleDisplayNames * U_EXPORT2
+uldn_openForContext(const char * locale, UDisplayContext *contexts,
+                    int32_t length, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+* Returns the UDisplayContext value for the specified UDisplayContextType.
+* @param ldn the ULocaleDisplayNames instance
+* @param type the UDisplayContextType whose value to return
+* @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates
+*               a failure status, the function will do nothing; otherwise this will be
+*               updated with any new status from the function. 
+* @return the UDisplayContextValue for the specified type.
+* @stable ICU 51
+*/
+U_STABLE UDisplayContext U_EXPORT2
+uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
+                UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#endif  /* !UCONFIG_NO_FORMATTING */
+#endif  /* __ULDNAMES_H__ */
diff --git a/libicu/ndk_headers/unicode/unorm2.h b/libicu/ndk_headers/unicode/unorm2.h
new file mode 100644
index 0000000..b2c8721
--- /dev/null
+++ b/libicu/ndk_headers/unicode/unorm2.h
@@ -0,0 +1,570 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*******************************************************************************
+*
+*   Copyright (C) 2009-2015, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+*******************************************************************************
+*   file name:  unorm2.h
+*   encoding:   UTF-8
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 2009dec15
+*   created by: Markus W. Scherer
+*/
+
+#ifndef __UNORM2_H__
+#define __UNORM2_H__
+
+/**
+ * \file
+ * \brief C API: New API for Unicode Normalization.
+ *
+ * Unicode normalization functionality for standard Unicode normalization or
+ * for using custom mapping tables.
+ * All instances of UNormalizer2 are unmodifiable/immutable.
+ * Instances returned by unorm2_getInstance() are singletons that must not be deleted by the caller.
+ * For more details see the Normalizer2 C++ class.
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/stringoptions.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif   // U_SHOW_CPLUSPLUS_API
+
+/**
+ * Constants for normalization modes.
+ * For details about standard Unicode normalization forms
+ * and about the algorithms which are also used with custom mapping tables
+ * see http://www.unicode.org/unicode/reports/tr15/
+ * @stable ICU 4.4
+ */
+typedef enum {
+    /**
+     * Decomposition followed by composition.
+     * Same as standard NFC when using an "nfc" instance.
+     * Same as standard NFKC when using an "nfkc" instance.
+     * For details about standard Unicode normalization forms
+     * see http://www.unicode.org/unicode/reports/tr15/
+     * @stable ICU 4.4
+     */
+    UNORM2_COMPOSE,
+    /**
+     * Map, and reorder canonically.
+     * Same as standard NFD when using an "nfc" instance.
+     * Same as standard NFKD when using an "nfkc" instance.
+     * For details about standard Unicode normalization forms
+     * see http://www.unicode.org/unicode/reports/tr15/
+     * @stable ICU 4.4
+     */
+    UNORM2_DECOMPOSE,
+    /**
+     * "Fast C or D" form.
+     * If a string is in this form, then further decomposition <i>without reordering</i>
+     * would yield the same form as DECOMPOSE.
+     * Text in "Fast C or D" form can be processed efficiently with data tables
+     * that are "canonically closed", that is, that provide equivalent data for
+     * equivalent text, without having to be fully normalized.
+     * Not a standard Unicode normalization form.
+     * Not a unique form: Different FCD strings can be canonically equivalent.
+     * For details see http://www.unicode.org/notes/tn5/#FCD
+     * @stable ICU 4.4
+     */
+    UNORM2_FCD,
+    /**
+     * Compose only contiguously.
+     * Also known as "FCC" or "Fast C Contiguous".
+     * The result will often but not always be in NFC.
+     * The result will conform to FCD which is useful for processing.
+     * Not a standard Unicode normalization form.
+     * For details see http://www.unicode.org/notes/tn5/#FCC
+     * @stable ICU 4.4
+     */
+    UNORM2_COMPOSE_CONTIGUOUS
+} UNormalization2Mode;
+
+/**
+ * Result values for normalization quick check functions.
+ * For details see http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms
+ * @stable ICU 2.0
+ */
+typedef enum UNormalizationCheckResult {
+  /**
+   * The input string is not in the normalization form.
+   * @stable ICU 2.0
+   */
+  UNORM_NO,
+  /**
+   * The input string is in the normalization form.
+   * @stable ICU 2.0
+   */
+  UNORM_YES,
+  /**
+   * The input string may or may not be in the normalization form.
+   * This value is only returned for composition forms like NFC and FCC,
+   * when a backward-combining character is found for which the surrounding text
+   * would have to be analyzed further.
+   * @stable ICU 2.0
+   */
+  UNORM_MAYBE
+} UNormalizationCheckResult;
+
+/**
+ * Opaque C service object type for the new normalization API.
+ * @stable ICU 4.4
+ */
+struct UNormalizer2;
+typedef struct UNormalizer2 UNormalizer2;  /**< C typedef for struct UNormalizer2. @stable ICU 4.4 */
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns a UNormalizer2 instance for Unicode NFC normalization.
+ * Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode).
+ * Returns an unmodifiable singleton instance. Do not delete it.
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                  pass the U_SUCCESS() test, or else the function returns
+ *                  immediately. Check for U_FAILURE() on output or use with
+ *                  function chaining. (See User Guide for details.)
+ * @return the requested Normalizer2, if successful
+ * @stable ICU 49
+ */
+U_STABLE const UNormalizer2 * U_EXPORT2
+unorm2_getNFCInstance(UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns a UNormalizer2 instance for Unicode NFD normalization.
+ * Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode).
+ * Returns an unmodifiable singleton instance. Do not delete it.
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                  pass the U_SUCCESS() test, or else the function returns
+ *                  immediately. Check for U_FAILURE() on output or use with
+ *                  function chaining. (See User Guide for details.)
+ * @return the requested Normalizer2, if successful
+ * @stable ICU 49
+ */
+U_STABLE const UNormalizer2 * U_EXPORT2
+unorm2_getNFDInstance(UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns a UNormalizer2 instance for Unicode NFKC normalization.
+ * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode).
+ * Returns an unmodifiable singleton instance. Do not delete it.
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                  pass the U_SUCCESS() test, or else the function returns
+ *                  immediately. Check for U_FAILURE() on output or use with
+ *                  function chaining. (See User Guide for details.)
+ * @return the requested Normalizer2, if successful
+ * @stable ICU 49
+ */
+U_STABLE const UNormalizer2 * U_EXPORT2
+unorm2_getNFKCInstance(UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns a UNormalizer2 instance for Unicode NFKD normalization.
+ * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode).
+ * Returns an unmodifiable singleton instance. Do not delete it.
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                  pass the U_SUCCESS() test, or else the function returns
+ *                  immediately. Check for U_FAILURE() on output or use with
+ *                  function chaining. (See User Guide for details.)
+ * @return the requested Normalizer2, if successful
+ * @stable ICU 49
+ */
+U_STABLE const UNormalizer2 * U_EXPORT2
+unorm2_getNFKDInstance(UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization.
+ * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode).
+ * Returns an unmodifiable singleton instance. Do not delete it.
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                  pass the U_SUCCESS() test, or else the function returns
+ *                  immediately. Check for U_FAILURE() on output or use with
+ *                  function chaining. (See User Guide for details.)
+ * @return the requested Normalizer2, if successful
+ * @stable ICU 49
+ */
+U_STABLE const UNormalizer2 * U_EXPORT2
+unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Closes a UNormalizer2 instance from unorm2_openFiltered().
+ * Do not close instances from unorm2_getInstance()!
+ * @param norm2 UNormalizer2 instance to be closed
+ * @stable ICU 4.4
+ */
+U_STABLE void U_EXPORT2
+unorm2_close(UNormalizer2 *norm2) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUNormalizer2Pointer
+ * "Smart pointer" class, closes a UNormalizer2 via unorm2_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close);
+
+U_NAMESPACE_END
+
+#endif
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Writes the normalized form of the source string to the destination string
+ * (replacing its contents) and returns the length of the destination string.
+ * The source and destination strings must be different buffers.
+ * @param norm2 UNormalizer2 instance
+ * @param src source string
+ * @param length length of the source string, or -1 if NUL-terminated
+ * @param dest destination string; its contents is replaced with normalized src
+ * @param capacity number of UChars that can be written to dest
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return dest
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+unorm2_normalize(const UNormalizer2 *norm2,
+                 const UChar *src, int32_t length,
+                 UChar *dest, int32_t capacity,
+                 UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Appends the normalized form of the second string to the first string
+ * (merging them at the boundary) and returns the length of the first string.
+ * The result is normalized if the first string was normalized.
+ * The first and second strings must be different buffers.
+ * @param norm2 UNormalizer2 instance
+ * @param first string, should be normalized
+ * @param firstLength length of the first string, or -1 if NUL-terminated
+ * @param firstCapacity number of UChars that can be written to first
+ * @param second string, will be normalized
+ * @param secondLength length of the source string, or -1 if NUL-terminated
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return first
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
+                                UChar *first, int32_t firstLength, int32_t firstCapacity,
+                                const UChar *second, int32_t secondLength,
+                                UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Appends the second string to the first string
+ * (merging them at the boundary) and returns the length of the first string.
+ * The result is normalized if both the strings were normalized.
+ * The first and second strings must be different buffers.
+ * @param norm2 UNormalizer2 instance
+ * @param first string, should be normalized
+ * @param firstLength length of the first string, or -1 if NUL-terminated
+ * @param firstCapacity number of UChars that can be written to first
+ * @param second string, should be normalized
+ * @param secondLength length of the source string, or -1 if NUL-terminated
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return first
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+unorm2_append(const UNormalizer2 *norm2,
+              UChar *first, int32_t firstLength, int32_t firstCapacity,
+              const UChar *second, int32_t secondLength,
+              UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Gets the decomposition mapping of c.
+ * Roughly equivalent to normalizing the String form of c
+ * on a UNORM2_DECOMPOSE UNormalizer2 instance, but much faster, and except that this function
+ * returns a negative value and does not write a string
+ * if c does not have a decomposition mapping in this instance's data.
+ * This function is independent of the mode of the UNormalizer2.
+ * @param norm2 UNormalizer2 instance
+ * @param c code point
+ * @param decomposition String buffer which will be set to c's
+ *                      decomposition mapping, if there is one.
+ * @param capacity number of UChars that can be written to decomposition
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return the non-negative length of c's decomposition, if there is one; otherwise a negative value
+ * @stable ICU 4.6
+ */
+U_STABLE int32_t U_EXPORT2
+unorm2_getDecomposition(const UNormalizer2 *norm2,
+                        UChar32 c, UChar *decomposition, int32_t capacity,
+                        UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Gets the raw decomposition mapping of c.
+ *
+ * This is similar to the unorm2_getDecomposition() function but returns the
+ * raw decomposition mapping as specified in UnicodeData.txt or
+ * (for custom data) in the mapping files processed by the gennorm2 tool.
+ * By contrast, unorm2_getDecomposition() returns the processed,
+ * recursively-decomposed version of this mapping.
+ *
+ * When used on a standard NFKC Normalizer2 instance,
+ * unorm2_getRawDecomposition() returns the Unicode Decomposition_Mapping (dm) property.
+ *
+ * When used on a standard NFC Normalizer2 instance,
+ * it returns the Decomposition_Mapping only if the Decomposition_Type (dt) is Canonical (Can);
+ * in this case, the result contains either one or two code points (=1..4 UChars).
+ *
+ * This function is independent of the mode of the UNormalizer2.
+ * @param norm2 UNormalizer2 instance
+ * @param c code point
+ * @param decomposition String buffer which will be set to c's
+ *                      raw decomposition mapping, if there is one.
+ * @param capacity number of UChars that can be written to decomposition
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return the non-negative length of c's raw decomposition, if there is one; otherwise a negative value
+ * @stable ICU 49
+ */
+U_STABLE int32_t U_EXPORT2
+unorm2_getRawDecomposition(const UNormalizer2 *norm2,
+                           UChar32 c, UChar *decomposition, int32_t capacity,
+                           UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Performs pairwise composition of a & b and returns the composite if there is one.
+ *
+ * Returns a composite code point c only if c has a two-way mapping to a+b.
+ * In standard Unicode normalization, this means that
+ * c has a canonical decomposition to a+b
+ * and c does not have the Full_Composition_Exclusion property.
+ *
+ * This function is independent of the mode of the UNormalizer2.
+ * @param norm2 UNormalizer2 instance
+ * @param a A (normalization starter) code point.
+ * @param b Another code point.
+ * @return The non-negative composite code point if there is one; otherwise a negative value.
+ * @stable ICU 49
+ */
+U_STABLE UChar32 U_EXPORT2
+unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Gets the combining class of c.
+ * The default implementation returns 0
+ * but all standard implementations return the Unicode Canonical_Combining_Class value.
+ * @param norm2 UNormalizer2 instance
+ * @param c code point
+ * @return c's combining class
+ * @stable ICU 49
+ */
+U_STABLE uint8_t U_EXPORT2
+unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Tests if the string is normalized.
+ * Internally, in cases where the quickCheck() method would return "maybe"
+ * (which is only possible for the two COMPOSE modes) this method
+ * resolves to "yes" or "no" to provide a definitive result,
+ * at the cost of doing more work in those cases.
+ * @param norm2 UNormalizer2 instance
+ * @param s input string
+ * @param length length of the string, or -1 if NUL-terminated
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return TRUE if s is normalized
+ * @stable ICU 4.4
+ */
+U_STABLE UBool U_EXPORT2
+unorm2_isNormalized(const UNormalizer2 *norm2,
+                    const UChar *s, int32_t length,
+                    UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Tests if the string is normalized.
+ * For the two COMPOSE modes, the result could be "maybe" in cases that
+ * would take a little more work to resolve definitively.
+ * Use spanQuickCheckYes() and normalizeSecondAndAppend() for a faster
+ * combination of quick check + normalization, to avoid
+ * re-checking the "yes" prefix.
+ * @param norm2 UNormalizer2 instance
+ * @param s input string
+ * @param length length of the string, or -1 if NUL-terminated
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return UNormalizationCheckResult
+ * @stable ICU 4.4
+ */
+U_STABLE UNormalizationCheckResult U_EXPORT2
+unorm2_quickCheck(const UNormalizer2 *norm2,
+                  const UChar *s, int32_t length,
+                  UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the end of the normalized substring of the input string.
+ * In other words, with <code>end=spanQuickCheckYes(s, ec);</code>
+ * the substring <code>UnicodeString(s, 0, end)</code>
+ * will pass the quick check with a "yes" result.
+ *
+ * The returned end index is usually one or more characters before the
+ * "no" or "maybe" character: The end index is at a normalization boundary.
+ * (See the class documentation for more about normalization boundaries.)
+ *
+ * When the goal is a normalized string and most input strings are expected
+ * to be normalized already, then call this method,
+ * and if it returns a prefix shorter than the input string,
+ * copy that prefix and use normalizeSecondAndAppend() for the remainder.
+ * @param norm2 UNormalizer2 instance
+ * @param s input string
+ * @param length length of the string, or -1 if NUL-terminated
+ * @param pErrorCode Standard ICU error code. Its input value must
+ *                   pass the U_SUCCESS() test, or else the function returns
+ *                   immediately. Check for U_FAILURE() on output or use with
+ *                   function chaining. (See User Guide for details.)
+ * @return "yes" span end index
+ * @stable ICU 4.4
+ */
+U_STABLE int32_t U_EXPORT2
+unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
+                         const UChar *s, int32_t length,
+                         UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Tests if the character always has a normalization boundary before it,
+ * regardless of context.
+ * For details see the Normalizer2 base class documentation.
+ * @param norm2 UNormalizer2 instance
+ * @param c character to test
+ * @return TRUE if c has a normalization boundary before it
+ * @stable ICU 4.4
+ */
+U_STABLE UBool U_EXPORT2
+unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Tests if the character always has a normalization boundary after it,
+ * regardless of context.
+ * For details see the Normalizer2 base class documentation.
+ * @param norm2 UNormalizer2 instance
+ * @param c character to test
+ * @return TRUE if c has a normalization boundary after it
+ * @stable ICU 4.4
+ */
+U_STABLE UBool U_EXPORT2
+unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Tests if the character is normalization-inert.
+ * For details see the Normalizer2 base class documentation.
+ * @param norm2 UNormalizer2 instance
+ * @param c character to test
+ * @return TRUE if c is normalization-inert
+ * @stable ICU 4.4
+ */
+U_STABLE UBool U_EXPORT2
+unorm2_isInert(const UNormalizer2 *norm2, UChar32 c) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+#endif  /* !UCONFIG_NO_NORMALIZATION */
+#endif  /* __UNORM2_H__ */
diff --git a/libicu/ndk_headers/unicode/uscript.h b/libicu/ndk_headers/unicode/uscript.h
new file mode 100644
index 0000000..90c343e
--- /dev/null
+++ b/libicu/ndk_headers/unicode/uscript.h
@@ -0,0 +1,752 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+ **********************************************************************
+ *   Copyright (C) 1997-2016, International Business Machines
+ *   Corporation and others.  All Rights Reserved.
+ **********************************************************************
+ *
+ * File USCRIPT.H
+ *
+ * Modification History:
+ *
+ *   Date        Name        Description
+ *   07/06/2001    Ram         Creation.
+ ******************************************************************************
+ */
+
+#ifndef USCRIPT_H
+#define USCRIPT_H
+#include "unicode/utypes.h"
+
+/**
+ * \file
+ * \brief C API: Unicode Script Information
+ */
+
+/**
+ * Constants for ISO 15924 script codes.
+ *
+ * The current set of script code constants supports at least all scripts
+ * that are encoded in the version of Unicode which ICU currently supports.
+ * The names of the constants are usually derived from the
+ * Unicode script property value aliases.
+ * See UAX #24 Unicode Script Property (http://www.unicode.org/reports/tr24/)
+ * and http://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt .
+ *
+ * In addition, constants for many ISO 15924 script codes
+ * are included, for use with language tags, CLDR data, and similar.
+ * Some of those codes are not used in the Unicode Character Database (UCD).
+ * For example, there are no characters that have a UCD script property value of
+ * Hans or Hant. All Han ideographs have the Hani script property value in Unicode.
+ *
+ * Private-use codes Qaaa..Qabx are not included, except as used in the UCD or in CLDR.
+ *
+ * Starting with ICU 55, script codes are only added when their scripts
+ * have been or will certainly be encoded in Unicode,
+ * and have been assigned Unicode script property value aliases,
+ * to ensure that their script names are stable and match the names of the constants.
+ * Script codes like Latf and Aran that are not subject to separate encoding
+ * may be added at any time.
+ *
+ * @stable ICU 2.2
+ */
+typedef enum UScriptCode {
+    /*
+     * Note: UScriptCode constants and their ISO script code comments
+     * are parsed by preparseucd.py.
+     * It matches lines like
+     *     USCRIPT_<Unicode Script value name> = <integer>,  / * <ISO script code> * /
+     */
+
+      /** @stable ICU 2.2 */
+      USCRIPT_INVALID_CODE = -1,
+      /** @stable ICU 2.2 */
+      USCRIPT_COMMON       =  0,  /* Zyyy */
+      /** @stable ICU 2.2 */
+      USCRIPT_INHERITED    =  1,  /* Zinh */ /* "Code for inherited script", for non-spacing combining marks; also Qaai */
+      /** @stable ICU 2.2 */
+      USCRIPT_ARABIC       =  2,  /* Arab */
+      /** @stable ICU 2.2 */
+      USCRIPT_ARMENIAN     =  3,  /* Armn */
+      /** @stable ICU 2.2 */
+      USCRIPT_BENGALI      =  4,  /* Beng */
+      /** @stable ICU 2.2 */
+      USCRIPT_BOPOMOFO     =  5,  /* Bopo */
+      /** @stable ICU 2.2 */
+      USCRIPT_CHEROKEE     =  6,  /* Cher */
+      /** @stable ICU 2.2 */
+      USCRIPT_COPTIC       =  7,  /* Copt */
+      /** @stable ICU 2.2 */
+      USCRIPT_CYRILLIC     =  8,  /* Cyrl */
+      /** @stable ICU 2.2 */
+      USCRIPT_DESERET      =  9,  /* Dsrt */
+      /** @stable ICU 2.2 */
+      USCRIPT_DEVANAGARI   = 10,  /* Deva */
+      /** @stable ICU 2.2 */
+      USCRIPT_ETHIOPIC     = 11,  /* Ethi */
+      /** @stable ICU 2.2 */
+      USCRIPT_GEORGIAN     = 12,  /* Geor */
+      /** @stable ICU 2.2 */
+      USCRIPT_GOTHIC       = 13,  /* Goth */
+      /** @stable ICU 2.2 */
+      USCRIPT_GREEK        = 14,  /* Grek */
+      /** @stable ICU 2.2 */
+      USCRIPT_GUJARATI     = 15,  /* Gujr */
+      /** @stable ICU 2.2 */
+      USCRIPT_GURMUKHI     = 16,  /* Guru */
+      /** @stable ICU 2.2 */
+      USCRIPT_HAN          = 17,  /* Hani */
+      /** @stable ICU 2.2 */
+      USCRIPT_HANGUL       = 18,  /* Hang */
+      /** @stable ICU 2.2 */
+      USCRIPT_HEBREW       = 19,  /* Hebr */
+      /** @stable ICU 2.2 */
+      USCRIPT_HIRAGANA     = 20,  /* Hira */
+      /** @stable ICU 2.2 */
+      USCRIPT_KANNADA      = 21,  /* Knda */
+      /** @stable ICU 2.2 */
+      USCRIPT_KATAKANA     = 22,  /* Kana */
+      /** @stable ICU 2.2 */
+      USCRIPT_KHMER        = 23,  /* Khmr */
+      /** @stable ICU 2.2 */
+      USCRIPT_LAO          = 24,  /* Laoo */
+      /** @stable ICU 2.2 */
+      USCRIPT_LATIN        = 25,  /* Latn */
+      /** @stable ICU 2.2 */
+      USCRIPT_MALAYALAM    = 26,  /* Mlym */
+      /** @stable ICU 2.2 */
+      USCRIPT_MONGOLIAN    = 27,  /* Mong */
+      /** @stable ICU 2.2 */
+      USCRIPT_MYANMAR      = 28,  /* Mymr */
+      /** @stable ICU 2.2 */
+      USCRIPT_OGHAM        = 29,  /* Ogam */
+      /** @stable ICU 2.2 */
+      USCRIPT_OLD_ITALIC   = 30,  /* Ital */
+      /** @stable ICU 2.2 */
+      USCRIPT_ORIYA        = 31,  /* Orya */
+      /** @stable ICU 2.2 */
+      USCRIPT_RUNIC        = 32,  /* Runr */
+      /** @stable ICU 2.2 */
+      USCRIPT_SINHALA      = 33,  /* Sinh */
+      /** @stable ICU 2.2 */
+      USCRIPT_SYRIAC       = 34,  /* Syrc */
+      /** @stable ICU 2.2 */
+      USCRIPT_TAMIL        = 35,  /* Taml */
+      /** @stable ICU 2.2 */
+      USCRIPT_TELUGU       = 36,  /* Telu */
+      /** @stable ICU 2.2 */
+      USCRIPT_THAANA       = 37,  /* Thaa */
+      /** @stable ICU 2.2 */
+      USCRIPT_THAI         = 38,  /* Thai */
+      /** @stable ICU 2.2 */
+      USCRIPT_TIBETAN      = 39,  /* Tibt */
+      /** Canadian_Aboriginal script. @stable ICU 2.6 */
+      USCRIPT_CANADIAN_ABORIGINAL = 40,  /* Cans */
+      /** Canadian_Aboriginal script (alias). @stable ICU 2.2 */
+      USCRIPT_UCAS         = USCRIPT_CANADIAN_ABORIGINAL,
+      /** @stable ICU 2.2 */
+      USCRIPT_YI           = 41,  /* Yiii */
+      /* New scripts in Unicode 3.2 */
+      /** @stable ICU 2.2 */
+      USCRIPT_TAGALOG      = 42,  /* Tglg */
+      /** @stable ICU 2.2 */
+      USCRIPT_HANUNOO      = 43,  /* Hano */
+      /** @stable ICU 2.2 */
+      USCRIPT_BUHID        = 44,  /* Buhd */
+      /** @stable ICU 2.2 */
+      USCRIPT_TAGBANWA     = 45,  /* Tagb */
+
+      /* New scripts in Unicode 4 */
+      /** @stable ICU 2.6 */
+      USCRIPT_BRAILLE      = 46,  /* Brai */
+      /** @stable ICU 2.6 */
+      USCRIPT_CYPRIOT      = 47,  /* Cprt */
+      /** @stable ICU 2.6 */
+      USCRIPT_LIMBU        = 48,  /* Limb */
+      /** @stable ICU 2.6 */
+      USCRIPT_LINEAR_B     = 49,  /* Linb */
+      /** @stable ICU 2.6 */
+      USCRIPT_OSMANYA      = 50,  /* Osma */
+      /** @stable ICU 2.6 */
+      USCRIPT_SHAVIAN      = 51,  /* Shaw */
+      /** @stable ICU 2.6 */
+      USCRIPT_TAI_LE       = 52,  /* Tale */
+      /** @stable ICU 2.6 */
+      USCRIPT_UGARITIC     = 53,  /* Ugar */
+
+      /** New script code in Unicode 4.0.1 @stable ICU 3.0 */
+      USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */
+
+      /* New scripts in Unicode 4.1 */
+      /** @stable ICU 3.4 */
+      USCRIPT_BUGINESE      = 55, /* Bugi */
+      /** @stable ICU 3.4 */
+      USCRIPT_GLAGOLITIC    = 56, /* Glag */
+      /** @stable ICU 3.4 */
+      USCRIPT_KHAROSHTHI    = 57, /* Khar */
+      /** @stable ICU 3.4 */
+      USCRIPT_SYLOTI_NAGRI  = 58, /* Sylo */
+      /** @stable ICU 3.4 */
+      USCRIPT_NEW_TAI_LUE   = 59, /* Talu */
+      /** @stable ICU 3.4 */
+      USCRIPT_TIFINAGH      = 60, /* Tfng */
+      /** @stable ICU 3.4 */
+      USCRIPT_OLD_PERSIAN   = 61, /* Xpeo */
+
+      /* New script codes from Unicode and ISO 15924 */
+      /** @stable ICU 3.6 */
+      USCRIPT_BALINESE                      = 62, /* Bali */
+      /** @stable ICU 3.6 */
+      USCRIPT_BATAK                         = 63, /* Batk */
+      /** @stable ICU 3.6 */
+      USCRIPT_BLISSYMBOLS                   = 64, /* Blis */
+      /** @stable ICU 3.6 */
+      USCRIPT_BRAHMI                        = 65, /* Brah */
+      /** @stable ICU 3.6 */
+      USCRIPT_CHAM                          = 66, /* Cham */
+      /** @stable ICU 3.6 */
+      USCRIPT_CIRTH                         = 67, /* Cirt */
+      /** @stable ICU 3.6 */
+      USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC  = 68, /* Cyrs */
+      /** @stable ICU 3.6 */
+      USCRIPT_DEMOTIC_EGYPTIAN              = 69, /* Egyd */
+      /** @stable ICU 3.6 */
+      USCRIPT_HIERATIC_EGYPTIAN             = 70, /* Egyh */
+      /** @stable ICU 3.6 */
+      USCRIPT_EGYPTIAN_HIEROGLYPHS          = 71, /* Egyp */
+      /** @stable ICU 3.6 */
+      USCRIPT_KHUTSURI                      = 72, /* Geok */
+      /** @stable ICU 3.6 */
+      USCRIPT_SIMPLIFIED_HAN                = 73, /* Hans */
+      /** @stable ICU 3.6 */
+      USCRIPT_TRADITIONAL_HAN               = 74, /* Hant */
+      /** @stable ICU 3.6 */
+      USCRIPT_PAHAWH_HMONG                  = 75, /* Hmng */
+      /** @stable ICU 3.6 */
+      USCRIPT_OLD_HUNGARIAN                 = 76, /* Hung */
+      /** @stable ICU 3.6 */
+      USCRIPT_HARAPPAN_INDUS                = 77, /* Inds */
+      /** @stable ICU 3.6 */
+      USCRIPT_JAVANESE                      = 78, /* Java */
+      /** @stable ICU 3.6 */
+      USCRIPT_KAYAH_LI                      = 79, /* Kali */
+      /** @stable ICU 3.6 */
+      USCRIPT_LATIN_FRAKTUR                 = 80, /* Latf */
+      /** @stable ICU 3.6 */
+      USCRIPT_LATIN_GAELIC                  = 81, /* Latg */
+      /** @stable ICU 3.6 */
+      USCRIPT_LEPCHA                        = 82, /* Lepc */
+      /** @stable ICU 3.6 */
+      USCRIPT_LINEAR_A                      = 83, /* Lina */
+      /** @stable ICU 4.6 */
+      USCRIPT_MANDAIC                       = 84, /* Mand */
+      /** @stable ICU 3.6 */
+      USCRIPT_MANDAEAN                      = USCRIPT_MANDAIC,
+      /** @stable ICU 3.6 */
+      USCRIPT_MAYAN_HIEROGLYPHS             = 85, /* Maya */
+      /** @stable ICU 4.6 */
+      USCRIPT_MEROITIC_HIEROGLYPHS          = 86, /* Mero */
+      /** @stable ICU 3.6 */
+      USCRIPT_MEROITIC                      = USCRIPT_MEROITIC_HIEROGLYPHS,
+      /** @stable ICU 3.6 */
+      USCRIPT_NKO                           = 87, /* Nkoo */
+      /** @stable ICU 3.6 */
+      USCRIPT_ORKHON                        = 88, /* Orkh */
+      /** @stable ICU 3.6 */
+      USCRIPT_OLD_PERMIC                    = 89, /* Perm */
+      /** @stable ICU 3.6 */
+      USCRIPT_PHAGS_PA                      = 90, /* Phag */
+      /** @stable ICU 3.6 */
+      USCRIPT_PHOENICIAN                    = 91, /* Phnx */
+      /** @stable ICU 52 */
+      USCRIPT_MIAO                          = 92, /* Plrd */
+      /** @stable ICU 3.6 */
+      USCRIPT_PHONETIC_POLLARD              = USCRIPT_MIAO,
+      /** @stable ICU 3.6 */
+      USCRIPT_RONGORONGO                    = 93, /* Roro */
+      /** @stable ICU 3.6 */
+      USCRIPT_SARATI                        = 94, /* Sara */
+      /** @stable ICU 3.6 */
+      USCRIPT_ESTRANGELO_SYRIAC             = 95, /* Syre */
+      /** @stable ICU 3.6 */
+      USCRIPT_WESTERN_SYRIAC                = 96, /* Syrj */
+      /** @stable ICU 3.6 */
+      USCRIPT_EASTERN_SYRIAC                = 97, /* Syrn */
+      /** @stable ICU 3.6 */
+      USCRIPT_TENGWAR                       = 98, /* Teng */
+      /** @stable ICU 3.6 */
+      USCRIPT_VAI                           = 99, /* Vaii */
+      /** @stable ICU 3.6 */
+      USCRIPT_VISIBLE_SPEECH                = 100,/* Visp */
+      /** @stable ICU 3.6 */
+      USCRIPT_CUNEIFORM                     = 101,/* Xsux */
+      /** @stable ICU 3.6 */
+      USCRIPT_UNWRITTEN_LANGUAGES           = 102,/* Zxxx */
+      /** @stable ICU 3.6 */
+      USCRIPT_UNKNOWN                       = 103,/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */
+
+      /** @stable ICU 3.8 */
+      USCRIPT_CARIAN                        = 104,/* Cari */
+      /** @stable ICU 3.8 */
+      USCRIPT_JAPANESE                      = 105,/* Jpan */
+      /** @stable ICU 3.8 */
+      USCRIPT_LANNA                         = 106,/* Lana */
+      /** @stable ICU 3.8 */
+      USCRIPT_LYCIAN                        = 107,/* Lyci */
+      /** @stable ICU 3.8 */
+      USCRIPT_LYDIAN                        = 108,/* Lydi */
+      /** @stable ICU 3.8 */
+      USCRIPT_OL_CHIKI                      = 109,/* Olck */
+      /** @stable ICU 3.8 */
+      USCRIPT_REJANG                        = 110,/* Rjng */
+      /** @stable ICU 3.8 */
+      USCRIPT_SAURASHTRA                    = 111,/* Saur */
+      /** Sutton SignWriting @stable ICU 3.8 */
+      USCRIPT_SIGN_WRITING                  = 112,/* Sgnw */
+      /** @stable ICU 3.8 */
+      USCRIPT_SUNDANESE                     = 113,/* Sund */
+      /** @stable ICU 3.8 */
+      USCRIPT_MOON                          = 114,/* Moon */
+      /** @stable ICU 3.8 */
+      USCRIPT_MEITEI_MAYEK                  = 115,/* Mtei */
+
+      /** @stable ICU 4.0 */
+      USCRIPT_IMPERIAL_ARAMAIC              = 116,/* Armi */
+      /** @stable ICU 4.0 */
+      USCRIPT_AVESTAN                       = 117,/* Avst */
+      /** @stable ICU 4.0 */
+      USCRIPT_CHAKMA                        = 118,/* Cakm */
+      /** @stable ICU 4.0 */
+      USCRIPT_KOREAN                        = 119,/* Kore */
+      /** @stable ICU 4.0 */
+      USCRIPT_KAITHI                        = 120,/* Kthi */
+      /** @stable ICU 4.0 */
+      USCRIPT_MANICHAEAN                    = 121,/* Mani */
+      /** @stable ICU 4.0 */
+      USCRIPT_INSCRIPTIONAL_PAHLAVI         = 122,/* Phli */
+      /** @stable ICU 4.0 */
+      USCRIPT_PSALTER_PAHLAVI               = 123,/* Phlp */
+      /** @stable ICU 4.0 */
+      USCRIPT_BOOK_PAHLAVI                  = 124,/* Phlv */
+      /** @stable ICU 4.0 */
+      USCRIPT_INSCRIPTIONAL_PARTHIAN        = 125,/* Prti */
+      /** @stable ICU 4.0 */
+      USCRIPT_SAMARITAN                     = 126,/* Samr */
+      /** @stable ICU 4.0 */
+      USCRIPT_TAI_VIET                      = 127,/* Tavt */
+      /** @stable ICU 4.0 */
+      USCRIPT_MATHEMATICAL_NOTATION         = 128,/* Zmth */
+      /** @stable ICU 4.0 */
+      USCRIPT_SYMBOLS                       = 129,/* Zsym */
+
+      /** @stable ICU 4.4 */
+      USCRIPT_BAMUM                         = 130,/* Bamu */
+      /** @stable ICU 4.4 */
+      USCRIPT_LISU                          = 131,/* Lisu */
+      /** @stable ICU 4.4 */
+      USCRIPT_NAKHI_GEBA                    = 132,/* Nkgb */
+      /** @stable ICU 4.4 */
+      USCRIPT_OLD_SOUTH_ARABIAN             = 133,/* Sarb */
+
+      /** @stable ICU 4.6 */
+      USCRIPT_BASSA_VAH                     = 134,/* Bass */
+      /** @stable ICU 54 */
+      USCRIPT_DUPLOYAN                      = 135,/* Dupl */
+#ifndef U_HIDE_DEPRECATED_API
+      /** @deprecated ICU 54 Typo, use USCRIPT_DUPLOYAN */
+      USCRIPT_DUPLOYAN_SHORTAND             = USCRIPT_DUPLOYAN,
+#endif  /* U_HIDE_DEPRECATED_API */
+      /** @stable ICU 4.6 */
+      USCRIPT_ELBASAN                       = 136,/* Elba */
+      /** @stable ICU 4.6 */
+      USCRIPT_GRANTHA                       = 137,/* Gran */
+      /** @stable ICU 4.6 */
+      USCRIPT_KPELLE                        = 138,/* Kpel */
+      /** @stable ICU 4.6 */
+      USCRIPT_LOMA                          = 139,/* Loma */
+      /** Mende Kikakui @stable ICU 4.6 */
+      USCRIPT_MENDE                         = 140,/* Mend */
+      /** @stable ICU 4.6 */
+      USCRIPT_MEROITIC_CURSIVE              = 141,/* Merc */
+      /** @stable ICU 4.6 */
+      USCRIPT_OLD_NORTH_ARABIAN             = 142,/* Narb */
+      /** @stable ICU 4.6 */
+      USCRIPT_NABATAEAN                     = 143,/* Nbat */
+      /** @stable ICU 4.6 */
+      USCRIPT_PALMYRENE                     = 144,/* Palm */
+      /** @stable ICU 54 */
+      USCRIPT_KHUDAWADI                     = 145,/* Sind */
+      /** @stable ICU 4.6 */
+      USCRIPT_SINDHI                        = USCRIPT_KHUDAWADI,
+      /** @stable ICU 4.6 */
+      USCRIPT_WARANG_CITI                   = 146,/* Wara */
+
+      /** @stable ICU 4.8 */
+      USCRIPT_AFAKA                         = 147,/* Afak */
+      /** @stable ICU 4.8 */
+      USCRIPT_JURCHEN                       = 148,/* Jurc */
+      /** @stable ICU 4.8 */
+      USCRIPT_MRO                           = 149,/* Mroo */
+      /** @stable ICU 4.8 */
+      USCRIPT_NUSHU                         = 150,/* Nshu */
+      /** @stable ICU 4.8 */
+      USCRIPT_SHARADA                       = 151,/* Shrd */
+      /** @stable ICU 4.8 */
+      USCRIPT_SORA_SOMPENG                  = 152,/* Sora */
+      /** @stable ICU 4.8 */
+      USCRIPT_TAKRI                         = 153,/* Takr */
+      /** @stable ICU 4.8 */
+      USCRIPT_TANGUT                        = 154,/* Tang */
+      /** @stable ICU 4.8 */
+      USCRIPT_WOLEAI                        = 155,/* Wole */
+
+      /** @stable ICU 49 */
+      USCRIPT_ANATOLIAN_HIEROGLYPHS         = 156,/* Hluw */
+      /** @stable ICU 49 */
+      USCRIPT_KHOJKI                        = 157,/* Khoj */
+      /** @stable ICU 49 */
+      USCRIPT_TIRHUTA                       = 158,/* Tirh */
+
+      /** @stable ICU 52 */
+      USCRIPT_CAUCASIAN_ALBANIAN            = 159,/* Aghb */
+      /** @stable ICU 52 */
+      USCRIPT_MAHAJANI                      = 160,/* Mahj */
+
+      /** @stable ICU 54 */
+      USCRIPT_AHOM                          = 161,/* Ahom */
+      /** @stable ICU 54 */
+      USCRIPT_HATRAN                        = 162,/* Hatr */
+      /** @stable ICU 54 */
+      USCRIPT_MODI                          = 163,/* Modi */
+      /** @stable ICU 54 */
+      USCRIPT_MULTANI                       = 164,/* Mult */
+      /** @stable ICU 54 */
+      USCRIPT_PAU_CIN_HAU                   = 165,/* Pauc */
+      /** @stable ICU 54 */
+      USCRIPT_SIDDHAM                       = 166,/* Sidd */
+
+      /** @stable ICU 58 */
+      USCRIPT_ADLAM                         = 167,/* Adlm */
+      /** @stable ICU 58 */
+      USCRIPT_BHAIKSUKI                     = 168,/* Bhks */
+      /** @stable ICU 58 */
+      USCRIPT_MARCHEN                       = 169,/* Marc */
+      /** @stable ICU 58 */
+      USCRIPT_NEWA                          = 170,/* Newa */
+      /** @stable ICU 58 */
+      USCRIPT_OSAGE                         = 171,/* Osge */
+
+      /** @stable ICU 58 */
+      USCRIPT_HAN_WITH_BOPOMOFO             = 172,/* Hanb */
+      /** @stable ICU 58 */
+      USCRIPT_JAMO                          = 173,/* Jamo */
+      /** @stable ICU 58 */
+      USCRIPT_SYMBOLS_EMOJI                 = 174,/* Zsye */
+
+      /** @stable ICU 60 */
+      USCRIPT_MASARAM_GONDI                 = 175,/* Gonm */
+      /** @stable ICU 60 */
+      USCRIPT_SOYOMBO                       = 176,/* Soyo */
+      /** @stable ICU 60 */
+      USCRIPT_ZANABAZAR_SQUARE              = 177,/* Zanb */
+
+      /** @stable ICU 62 */
+      USCRIPT_DOGRA                         = 178,/* Dogr */
+      /** @stable ICU 62 */
+      USCRIPT_GUNJALA_GONDI                 = 179,/* Gong */
+      /** @stable ICU 62 */
+      USCRIPT_MAKASAR                       = 180,/* Maka */
+      /** @stable ICU 62 */
+      USCRIPT_MEDEFAIDRIN                   = 181,/* Medf */
+      /** @stable ICU 62 */
+      USCRIPT_HANIFI_ROHINGYA               = 182,/* Rohg */
+      /** @stable ICU 62 */
+      USCRIPT_SOGDIAN                       = 183,/* Sogd */
+      /** @stable ICU 62 */
+      USCRIPT_OLD_SOGDIAN                   = 184,/* Sogo */
+
+      /** @stable ICU 64 */
+      USCRIPT_ELYMAIC                       = 185,/* Elym */
+      /** @stable ICU 64 */
+      USCRIPT_NYIAKENG_PUACHUE_HMONG        = 186,/* Hmnp */
+      /** @stable ICU 64 */
+      USCRIPT_NANDINAGARI                   = 187,/* Nand */
+      /** @stable ICU 64 */
+      USCRIPT_WANCHO                        = 188,/* Wcho */
+
+      /** @stable ICU 66 */
+      USCRIPT_CHORASMIAN                    = 189,/* Chrs */
+      /** @stable ICU 66 */
+      USCRIPT_DIVES_AKURU                   = 190,/* Diak */
+      /** @stable ICU 66 */
+      USCRIPT_KHITAN_SMALL_SCRIPT           = 191,/* Kits */
+      /** @stable ICU 66 */
+      USCRIPT_YEZIDI                        = 192,/* Yezi */
+
+#ifndef U_HIDE_DEPRECATED_API
+    /**
+     * One more than the highest normal UScriptCode value.
+     * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SCRIPT).
+     *
+     * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
+     */
+    USCRIPT_CODE_LIMIT    = 193
+#endif  // U_HIDE_DEPRECATED_API
+} UScriptCode;
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Gets the script codes associated with the given locale or ISO 15924 abbreviation or name.
+ * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym".
+ * Fills in USCRIPT_LATIN given "en" OR "en_US"
+ * If the required capacity is greater than the capacity of the destination buffer,
+ * then the error code is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned.
+ *
+ * <p>Note: To search by short or long script alias only, use
+ * u_getPropertyValueEnum(UCHAR_SCRIPT, alias) instead.  That does
+ * a fast lookup with no access of the locale data.
+ *
+ * @param nameOrAbbrOrLocale name of the script, as given in
+ * PropertyValueAliases.txt, or ISO 15924 code or locale
+ * @param fillIn the UScriptCode buffer to fill in the script code
+ * @param capacity the capacity (size) of UScriptCode buffer passed in.
+ * @param err the error status code.
+ * @return The number of script codes filled in the buffer passed in
+ * @stable ICU 2.4
+ */
+U_STABLE int32_t  U_EXPORT2
+uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the long Unicode script name, if there is one.
+ * Otherwise returns the 4-letter ISO 15924 script code.
+ * Returns "Malayam" given USCRIPT_MALAYALAM.
+ *
+ * @param scriptCode UScriptCode enum
+ * @return long script name as given in PropertyValueAliases.txt, or the 4-letter code,
+ * or NULL if scriptCode is invalid
+ * @stable ICU 2.4
+ */
+U_STABLE const char*  U_EXPORT2
+uscript_getName(UScriptCode scriptCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the 4-letter ISO 15924 script code,
+ * which is the same as the short Unicode script name if Unicode has names for the script.
+ * Returns "Mlym" given USCRIPT_MALAYALAM.
+ *
+ * @param scriptCode UScriptCode enum
+ * @return short script name (4-letter code), or NULL if scriptCode is invalid
+ * @stable ICU 2.4
+ */
+U_STABLE const char*  U_EXPORT2
+uscript_getShortName(UScriptCode scriptCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Gets the script code associated with the given codepoint.
+ * Returns USCRIPT_MALAYALAM given 0x0D02
+ * @param codepoint UChar32 codepoint
+ * @param err the error status code.
+ * @return The UScriptCode, or 0 if codepoint is invalid
+ * @stable ICU 2.4
+ */
+U_STABLE UScriptCode  U_EXPORT2
+uscript_getScript(UChar32 codepoint, UErrorCode *err) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Do the Script_Extensions of code point c contain script sc?
+ * If c does not have explicit Script_Extensions, then this tests whether
+ * c has the Script property value sc.
+ *
+ * Some characters are commonly used in multiple scripts.
+ * For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
+ * @param c code point
+ * @param sc script code
+ * @return TRUE if sc is in Script_Extensions(c)
+ * @stable ICU 49
+ */
+U_STABLE UBool U_EXPORT2
+uscript_hasScript(UChar32 c, UScriptCode sc) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Writes code point c's Script_Extensions as a list of UScriptCode values
+ * to the output scripts array and returns the number of script codes.
+ * - If c does have Script_Extensions, then the Script property value
+ *   (normally Common or Inherited) is not included.
+ * - If c does not have Script_Extensions, then the one Script code is written to the output array.
+ * - If c is not a valid code point, then the one USCRIPT_UNKNOWN code is written.
+ * In other words, if the return value is 1,
+ * then the output array contains exactly c's single Script code.
+ * If the return value is n>=2, then the output array contains c's n Script_Extensions script codes.
+ *
+ * Some characters are commonly used in multiple scripts.
+ * For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
+ *
+ * If there are more than capacity script codes to be written, then
+ * U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is returned.
+ * (Usual ICU buffer handling behavior.)
+ *
+ * @param c code point
+ * @param scripts output script code array
+ * @param capacity capacity of the scripts array
+ * @param errorCode Standard ICU error code. Its input value must
+ *                  pass the U_SUCCESS() test, or else the function returns
+ *                  immediately. Check for U_FAILURE() on output or use with
+ *                  function chaining. (See User Guide for details.)
+ * @return number of script codes in c's Script_Extensions, or 1 for the single Script value,
+ *         written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
+ * @stable ICU 49
+ */
+U_STABLE int32_t U_EXPORT2
+uscript_getScriptExtensions(UChar32 c,
+                            UScriptCode *scripts, int32_t capacity,
+                            UErrorCode *errorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Script usage constants.
+ * See UAX #31 Unicode Identifier and Pattern Syntax.
+ * http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers
+ *
+ * @stable ICU 51
+ */
+typedef enum UScriptUsage {
+    /** Not encoded in Unicode. @stable ICU 51 */
+    USCRIPT_USAGE_NOT_ENCODED,
+    /** Unknown script usage. @stable ICU 51 */
+    USCRIPT_USAGE_UNKNOWN,
+    /** Candidate for Exclusion from Identifiers. @stable ICU 51 */
+    USCRIPT_USAGE_EXCLUDED,
+    /** Limited Use script. @stable ICU 51 */
+    USCRIPT_USAGE_LIMITED_USE,
+    /** Aspirational Use script. @stable ICU 51 */
+    USCRIPT_USAGE_ASPIRATIONAL,
+    /** Recommended script. @stable ICU 51 */
+    USCRIPT_USAGE_RECOMMENDED
+} UScriptUsage;
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Writes the script sample character string.
+ * This string normally consists of one code point but might be longer.
+ * The string is empty if the script is not encoded.
+ *
+ * @param script script code
+ * @param dest output string array
+ * @param capacity number of UChars in the dest array
+ * @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS() on input
+ * @return the string length, even if U_BUFFER_OVERFLOW_ERROR
+ * @stable ICU 51
+ */
+U_STABLE int32_t U_EXPORT2
+uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+class UnicodeString;
+U_NAMESPACE_END
+
+/**
+ * Returns the script sample character string.
+ * This string normally consists of one code point but might be longer.
+ * The string is empty if the script is not encoded.
+ *
+ * @param script script code
+ * @return the sample character string
+ * @stable ICU 51
+ */
+U_COMMON_API icu::UnicodeString U_EXPORT2
+uscript_getSampleUnicodeString(UScriptCode script);
+
+#endif
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the script usage according to UAX #31 Unicode Identifier and Pattern Syntax.
+ * Returns USCRIPT_USAGE_NOT_ENCODED if the script is not encoded in Unicode.
+ *
+ * @param script script code
+ * @return script usage
+ * @see UScriptUsage
+ * @stable ICU 51
+ */
+U_STABLE UScriptUsage U_EXPORT2
+uscript_getUsage(UScriptCode script) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns TRUE if the script is written right-to-left.
+ * For example, Arab and Hebr.
+ *
+ * @param script script code
+ * @return TRUE if the script is right-to-left
+ * @stable ICU 51
+ */
+U_STABLE UBool U_EXPORT2
+uscript_isRightToLeft(UScriptCode script) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns TRUE if the script allows line breaks between letters (excluding hyphenation).
+ * Such a script typically requires dictionary-based line breaking.
+ * For example, Hani and Thai.
+ *
+ * @param script script code
+ * @return TRUE if the script allows line breaks between letters
+ * @stable ICU 51
+ */
+U_STABLE UBool U_EXPORT2
+uscript_breaksBetweenLetters(UScriptCode script) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary.
+ * For example, Latn and Cyrl.
+ *
+ * @param script script code
+ * @return TRUE if the script is cased
+ * @stable ICU 51
+ */
+U_STABLE UBool U_EXPORT2
+uscript_isCased(UScriptCode script) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#endif
diff --git a/libicu/ndk_headers/unicode/utext.h b/libicu/ndk_headers/unicode/utext.h
new file mode 100644
index 0000000..18edfea
--- /dev/null
+++ b/libicu/ndk_headers/unicode/utext.h
@@ -0,0 +1,685 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*******************************************************************************
+*
+*   Copyright (C) 2004-2012, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+*******************************************************************************
+*   file name:  utext.h
+*   encoding:   UTF-8
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 2004oct06
+*   created by: Markus W. Scherer
+*/
+
+#ifndef __UTEXT_H__
+#define __UTEXT_H__
+
+/**
+ * \file
+ * \brief C API: Abstract Unicode Text API
+ *
+ * The Text Access API provides a means to allow text that is stored in alternative
+ * formats to work with ICU services.  ICU normally operates on text that is
+ * stored in UTF-16 format, in (UChar *) arrays for the C APIs or as type
+ * UnicodeString for C++ APIs.
+ *
+ * ICU Text Access allows other formats, such as UTF-8 or non-contiguous
+ * UTF-16 strings, to be placed in a UText wrapper and then passed to ICU services.
+ *
+ * There are three general classes of usage for UText:
+ *
+ *     Application Level Use.  This is the simplest usage - applications would
+ *     use one of the utext_open() functions on their input text, and pass
+ *     the resulting UText to the desired ICU service.
+ *
+ *     Second is usage in ICU Services, such as break iteration, that will need to
+ *     operate on input presented to them as a UText.  These implementations
+ *     will need to use the iteration and related UText functions to gain
+ *     access to the actual text.
+ *
+ *     The third class of UText users are "text providers."  These are the
+ *     UText implementations for the various text storage formats.  An application
+ *     or system with a unique text storage format can implement a set of
+ *     UText provider functions for that format, which will then allow
+ *     ICU services to operate on that format.
+ *
+ *
+ * <em>Iterating over text</em>
+ *
+ * Here is sample code for a forward iteration over the contents of a UText
+ *
+ * \code
+ *    UChar32  c;
+ *    UText    *ut = whatever();
+ *
+ *    for (c=utext_next32From(ut, 0); c>=0; c=utext_next32(ut)) {
+ *       // do whatever with the codepoint c here.
+ *    }
+ * \endcode
+ *
+ * And here is similar code to iterate in the reverse direction, from the end
+ * of the text towards the beginning.
+ *
+ * \code
+ *    UChar32  c;
+ *    UText    *ut = whatever();
+ *    int      textLength = utext_nativeLength(ut);
+ *    for (c=utext_previous32From(ut, textLength); c>=0; c=utext_previous32(ut)) {
+ *       // do whatever with the codepoint c here.
+ *    }
+ * \endcode
+ *
+ * <em>Characters and Indexing</em>
+ *
+ * Indexing into text by UText functions is nearly always in terms of the native
+ * indexing of the underlying text storage.  The storage format could be UTF-8
+ * or UTF-32, for example.  When coding to the UText access API, no assumptions
+ * can be made regarding the size of characters, or how far an index
+ * may move when iterating between characters.
+ *
+ * All indices supplied to UText functions are pinned to the length of the
+ * text.  An out-of-bounds index is not considered to be an error, but is
+ * adjusted to be in the range  0 <= index <= length of input text.
+ *
+ *
+ * When an index position is returned from a UText function, it will be
+ * a native index to the underlying text.  In the case of multi-unit characters,
+ * it will  always refer to the first position of the character,
+ * never to the interior.  This is essentially the same thing as saying that
+ * a returned index will always point to a boundary between characters.
+ *
+ * When a native index is supplied to a UText function, all indices that
+ * refer to any part of a multi-unit character representation are considered
+ * to be equivalent.  In the case of multi-unit characters, an incoming index
+ * will be logically normalized to refer to the start of the character.
+ * 
+ * It is possible to test whether a native index is on a code point boundary
+ * by doing a utext_setNativeIndex() followed by a utext_getNativeIndex().
+ * If the index is returned unchanged, it was on a code point boundary.  If
+ * an adjusted index is returned, the original index referred to the
+ * interior of a character.
+ *
+ * <em>Conventions for calling UText functions</em>
+ *
+ * Most UText access functions have as their first parameter a (UText *) pointer,
+ * which specifies the UText to be used.  Unless otherwise noted, the
+ * pointer must refer to a valid, open UText.  Attempting to
+ * use a closed UText or passing a NULL pointer is a programming error and
+ * will produce undefined results or NULL pointer exceptions.
+ * 
+ * The UText_Open family of functions can either open an existing (closed)
+ * UText, or heap allocate a new UText.  Here is sample code for creating
+ * a stack-allocated UText.
+ *
+ * \code
+ *    char     *s = whatever();  // A utf-8 string 
+ *    U_ErrorCode status = U_ZERO_ERROR;
+ *    UText    ut = UTEXT_INITIALIZER;
+ *    utext_openUTF8(ut, s, -1, &status);
+ *    if (U_FAILURE(status)) {
+ *        // error handling
+ *    } else {
+ *        // work with the UText
+ *    }
+ * \endcode
+ *
+ * Any existing UText passed to an open function _must_ have been initialized, 
+ * either by the UTEXT_INITIALIZER, or by having been originally heap-allocated
+ * by an open function.  Passing NULL will cause the open function to
+ * heap-allocate and fully initialize a new UText.
+ *
+ */
+
+
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#include "unicode/rep.h"
+#include "unicode/unistr.h"
+#include "unicode/chariter.h"
+#endif
+
+
+U_CDECL_BEGIN
+
+struct UText;
+typedef struct UText UText; /**< C typedef for struct UText. @stable ICU 3.6 */
+
+
+/***************************************************************************************
+ *
+ *   C Functions for creating UText wrappers around various kinds of text strings.
+ *
+ ****************************************************************************************/
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  * Close function for UText instances.
+  * Cleans up, releases any resources being held by an open UText.
+  * <p>
+  *   If the UText was originally allocated by one of the utext_open functions,
+  *   the storage associated with the utext will also be freed.
+  *   If the UText storage originated with the application, as it would with
+  *   a local or static instance, the storage will not be deleted.
+  *
+  *   An open UText can be reset to refer to new string by using one of the utext_open()
+  *   functions without first closing the UText.  
+  *
+  * @param ut  The UText to be closed.
+  * @return    NULL if the UText struct was deleted by the close.  If the UText struct
+  *            was originally provided by the caller to the open function, it is
+  *            returned by this function, and may be safely used again in
+  *            a subsequent utext_open.
+  *
+  * @stable ICU 3.4
+  */
+U_STABLE UText * U_EXPORT2
+utext_close(UText *ut) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUTextPointer
+ * "Smart pointer" class, closes a UText via utext_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUTextPointer, UText, utext_close);
+
+U_NAMESPACE_END
+
+#endif
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Open a read-only UText implementation for UTF-8 strings.
+ * 
+ * \htmlonly
+ * Any invalid UTF-8 in the input will be handled in this way:
+ * a sequence of bytes that has the form of a truncated, but otherwise valid,
+ * UTF-8 sequence will be replaced by a single unicode replacement character, \uFFFD. 
+ * Any other illegal bytes will each be replaced by a \uFFFD.
+ * \endhtmlonly
+ * 
+ * @param ut     Pointer to a UText struct.  If NULL, a new UText will be created.
+ *               If non-NULL, must refer to an initialized UText struct, which will then
+ *               be reset to reference the specified UTF-8 string.
+ * @param s      A UTF-8 string.  Must not be NULL.
+ * @param length The length of the UTF-8 string in bytes, or -1 if the string is
+ *               zero terminated.
+ * @param status Errors are returned here.
+ * @return       A pointer to the UText.  If a pre-allocated UText was provided, it
+ *               will always be used and returned.
+ * @stable ICU 3.4
+ */
+U_STABLE UText * U_EXPORT2
+utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Open a read-only UText for UChar * string.
+ * 
+ * @param ut     Pointer to a UText struct.  If NULL, a new UText will be created.
+ *               If non-NULL, must refer to an initialized UText struct, which will then
+ *               be reset to reference the specified UChar string.
+ * @param s      A UChar (UTF-16) string
+ * @param length The number of UChars in the input string, or -1 if the string is
+ *               zero terminated.
+ * @param status Errors are returned here.
+ * @return       A pointer to the UText.  If a pre-allocated UText was provided, it
+ *               will always be used and returned.
+ * @stable ICU 3.4
+ */
+U_STABLE UText * U_EXPORT2
+utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if U_SHOW_CPLUSPLUS_API
+
+
+
+
+
+
+
+
+
+
+#endif
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  *  Clone a UText.  This is much like opening a UText where the source text is itself
+  *  another UText.
+  *
+  *  A deep clone will copy both the UText data structures and the underlying text.
+  *  The original and cloned UText will operate completely independently; modifications
+  *  made to the text in one will not affect the other.  Text providers are not
+  *  required to support deep clones.  The user of clone() must check the status return
+  *  and be prepared to handle failures.
+  *
+  *  The standard UText implementations for UTF8, UChar *, UnicodeString and
+  *  Replaceable all support deep cloning.
+  *
+  *  The UText returned from a deep clone will be writable, assuming that the text
+  *  provider is able to support writing, even if the source UText had been made
+  *  non-writable by means of UText_freeze().
+  *
+  *  A shallow clone replicates only the UText data structures; it does not make
+  *  a copy of the underlying text.  Shallow clones can be used as an efficient way to 
+  *  have multiple iterators active in a single text string that is not being
+  *  modified.
+  *
+  *  A shallow clone operation will not fail, barring truly exceptional conditions such
+  *  as memory allocation failures.
+  *
+  *  Shallow UText clones should be avoided if the UText functions that modify the
+  *  text are expected to be used, either on the original or the cloned UText.
+  *  Any such modifications  can cause unpredictable behavior.  Read Only
+  *  shallow clones provide some protection against errors of this type by
+  *  disabling text modification via the cloned UText.
+  *
+  *  A shallow clone made with the readOnly parameter == FALSE will preserve the 
+  *  utext_isWritable() state of the source object.  Note, however, that
+  *  write operations must be avoided while more than one UText exists that refer
+  *  to the same underlying text.
+  *
+  *  A UText and its clone may be safely concurrently accessed by separate threads.
+  *  This is true for read access only with shallow clones, and for both read and
+  *  write access with deep clones.
+  *  It is the responsibility of the Text Provider to ensure that this thread safety
+  *  constraint is met.
+  *
+  *  @param dest   A UText struct to be filled in with the result of the clone operation,
+  *                or NULL if the clone function should heap-allocate a new UText struct.
+  *                If non-NULL, must refer to an already existing UText, which will then
+  *                be reset to become the clone.
+  *  @param src    The UText to be cloned.
+  *  @param deep   TRUE to request a deep clone, FALSE for a shallow clone.
+  *  @param readOnly TRUE to request that the cloned UText have read only access to the 
+  *                underlying text.  
+
+  *  @param status Errors are returned here.  For deep clones, U_UNSUPPORTED_ERROR
+  *                will be returned if the text provider is unable to clone the
+  *                original text.
+  *  @return       The newly created clone, or NULL if the clone operation failed.
+  *  @stable ICU 3.4
+  */
+U_STABLE UText * U_EXPORT2
+utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  *  Compare two UText objects for equality.
+  *  UTexts are equal if they are iterating over the same text, and
+  *    have the same iteration position within the text.
+  *    If either or both of the parameters are NULL, the comparison is FALSE.
+  *
+  *  @param a   The first of the two UTexts to compare.
+  *  @param b   The other UText to be compared.
+  *  @return    TRUE if the two UTexts are equal.
+  *  @stable ICU 3.6
+  */
+U_STABLE UBool U_EXPORT2
+utext_equals(const UText *a, const UText *b) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+/*****************************************************************************
+ *
+ *   Functions to work with the text represented by a UText wrapper
+ *
+ *****************************************************************************/
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  * Get the length of the text.  Depending on the characteristics
+  * of the underlying text representation, this may be expensive.  
+  * @see  utext_isLengthExpensive()
+  *
+  *
+  * @param ut  the text to be accessed.
+  * @return the length of the text, expressed in native units.
+  *
+  * @stable ICU 3.4
+  */
+U_STABLE int64_t U_EXPORT2
+utext_nativeLength(UText *ut) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Returns the code point at the requested index,
+ * or U_SENTINEL (-1) if it is out of bounds.
+ *
+ * If the specified index points to the interior of a multi-unit
+ * character - one of the trail bytes of a UTF-8 sequence, for example -
+ * the complete code point will be returned.
+ *
+ * The iteration position will be set to the start of the returned code point.
+ *
+ * This function is roughly equivalent to the sequence
+ *    utext_setNativeIndex(index);
+ *    utext_current32();
+ * (There is a subtle difference if the index is out of bounds by being less than zero - 
+ * utext_setNativeIndex(negative value) sets the index to zero, after which utext_current()
+ * will return the char at zero.  utext_char32At(negative index), on the other hand, will
+ * return the U_SENTINEL value of -1.)
+ * 
+ * @param ut the text to be accessed
+ * @param nativeIndex the native index of the character to be accessed.  If the index points
+ *        to other than the first unit of a multi-unit character, it will be adjusted
+ *        to the start of the character.
+ * @return the code point at the specified index.
+ * @stable ICU 3.4
+ */
+U_STABLE UChar32 U_EXPORT2
+utext_char32At(UText *ut, int64_t nativeIndex) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ *
+ * Get the code point at the current iteration position,
+ * or U_SENTINEL (-1) if the iteration has reached the end of
+ * the input text.
+ *
+ * @param ut the text to be accessed.
+ * @return the Unicode code point at the current iterator position.
+ * @stable ICU 3.4
+ */
+U_STABLE UChar32 U_EXPORT2
+utext_current32(UText *ut) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the code point at the current iteration position of the UText, and
+ * advance the position to the first index following the character.
+ *
+ * If the position is at the end of the text (the index following
+ * the last character, which is also the length of the text), 
+ * return U_SENTINEL (-1) and do not advance the index. 
+ *
+ * This is a post-increment operation.
+ *
+ * An inline macro version of this function, UTEXT_NEXT32(), 
+ * is available for performance critical use.
+ *
+ * @param ut the text to be accessed.
+ * @return the Unicode code point at the iteration position.
+ * @see UTEXT_NEXT32
+ * @stable ICU 3.4
+ */
+U_STABLE UChar32 U_EXPORT2
+utext_next32(UText *ut) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ *  Move the iterator position to the character (code point) whose
+ *  index precedes the current position, and return that character.
+ *  This is a pre-decrement operation.
+ *
+ *  If the initial position is at the start of the text (index of 0) 
+ *  return U_SENTINEL (-1), and leave the position unchanged.
+ *
+ *  An inline macro version of this function, UTEXT_PREVIOUS32(), 
+ *  is available for performance critical use.
+ *
+ *  @param ut the text to be accessed.
+ *  @return the previous UChar32 code point, or U_SENTINEL (-1) 
+ *          if the iteration has reached the start of the text.
+ *  @see UTEXT_PREVIOUS32
+ *  @stable ICU 3.4
+ */
+U_STABLE UChar32 U_EXPORT2
+utext_previous32(UText *ut) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  * Set the iteration index and return the code point at that index. 
+  * Leave the iteration index at the start of the following code point.
+  *
+  * This function is the most efficient and convenient way to
+  * begin a forward iteration.  The results are identical to the those
+  * from the sequence
+  * \code
+  *    utext_setIndex();
+  *    utext_next32();
+  * \endcode
+  *
+  *  @param ut the text to be accessed.
+  *  @param nativeIndex Iteration index, in the native units of the text provider.
+  *  @return Code point which starts at or before index,
+  *         or U_SENTINEL (-1) if it is out of bounds.
+  * @stable ICU 3.4
+  */
+U_STABLE UChar32 U_EXPORT2
+utext_next32From(UText *ut, int64_t nativeIndex) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  * Set the iteration index, and return the code point preceding the
+  * one specified by the initial index.  Leave the iteration position
+  * at the start of the returned code point.
+  *
+  * This function is the most efficient and convenient way to
+  * begin a backwards iteration.
+  *
+  * @param ut the text to be accessed.
+  * @param nativeIndex Iteration index in the native units of the text provider.
+  * @return Code point preceding the one at the initial index,
+  *         or U_SENTINEL (-1) if it is out of bounds.
+  *
+  * @stable ICU 3.4
+  */
+U_STABLE UChar32 U_EXPORT2
+utext_previous32From(UText *ut, int64_t nativeIndex) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+  * Get the current iterator position, which can range from 0 to 
+  * the length of the text.
+  * The position is a native index into the input text, in whatever format it
+  * may have (possibly UTF-8 for example), and may not always be the same as
+  * the corresponding UChar (UTF-16) index.
+  * The returned position will always be aligned to a code point boundary. 
+  *
+  * @param ut the text to be accessed.
+  * @return the current index position, in the native units of the text provider.
+  * @stable ICU 3.4
+  */
+U_STABLE int64_t U_EXPORT2
+utext_getNativeIndex(const UText *ut) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Set the current iteration position to the nearest code point
+ * boundary at or preceding the specified index.
+ * The index is in the native units of the original input text.
+ * If the index is out of range, it will be pinned to be within
+ * the range of the input text.
+ * <p>
+ * It will usually be more efficient to begin an iteration
+ * using the functions utext_next32From() or utext_previous32From()
+ * rather than setIndex().
+ * <p>
+ * Moving the index position to an adjacent character is best done
+ * with utext_next32(), utext_previous32() or utext_moveIndex32().
+ * Attempting to do direct arithmetic on the index position is
+ * complicated by the fact that the size (in native units) of a
+ * character depends on the underlying representation of the character
+ * (UTF-8, UTF-16, UTF-32, arbitrary codepage), and is not
+ * easily knowable.
+ *
+ * @param ut the text to be accessed.
+ * @param nativeIndex the native unit index of the new iteration position.
+ * @stable ICU 3.4
+ */
+U_STABLE void U_EXPORT2
+utext_setNativeIndex(UText *ut, int64_t nativeIndex) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Move the iterator position by delta code points.  The number of code points
+ * is a signed number; a negative delta will move the iterator backwards,
+ * towards the start of the text.
+ * <p>
+ * The index is moved by <code>delta</code> code points
+ * forward or backward, but no further backward than to 0 and
+ * no further forward than to utext_nativeLength().
+ * The resulting index value will be in between 0 and length, inclusive.
+ *
+ * @param ut the text to be accessed.
+ * @param delta the signed number of code points to move the iteration position.
+ * @return TRUE if the position could be moved the requested number of positions while
+ *              staying within the range [0 - text length].
+ * @stable ICU 3.4
+ */
+U_STABLE UBool U_EXPORT2
+utext_moveIndex32(UText *ut, int32_t delta) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ * Get the native index of the character preceding the current position.
+ * If the iteration position is already at the start of the text, zero
+ * is returned.
+ * The value returned is the same as that obtained from the following sequence,
+ * but without the side effect of changing the iteration position.
+ *   
+ * \code
+ *    UText  *ut = whatever;
+ *      ...
+ *    utext_previous(ut)
+ *    utext_getNativeIndex(ut);
+ * \endcode
+ *
+ * This function is most useful during forwards iteration, where it will get the
+ *   native index of the character most recently returned from utext_next().
+ *
+ * @param ut the text to be accessed
+ * @return the native index of the character preceding the current index position,
+ *         or zero if the current position is at the start of the text.
+ * @stable ICU 3.6
+ */
+U_STABLE int64_t U_EXPORT2
+utext_getPreviousNativeIndex(UText *ut); 
+
+
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+/**
+ *
+ * Extract text from a UText into a UChar buffer.  The range of text to be extracted
+ * is specified in the native indices of the UText provider.  These may not necessarily
+ * be UTF-16 indices.
+ * <p>
+ * The size (number of 16 bit UChars) of the data to be extracted is returned.  The
+ * full number of UChars is returned, even when the extracted text is truncated
+ * because the specified buffer size is too small.
+ * <p>
+ * The extracted string will (if you are a user) / must (if you are a text provider)
+ * be NUL-terminated if there is sufficient space in the destination buffer.  This
+ * terminating NUL is not included in the returned length.
+ * <p>
+ * The iteration index is left at the position following the last extracted character.
+ *
+ * @param  ut    the UText from which to extract data.
+ * @param  nativeStart the native index of the first character to extract.\
+ *               If the specified index is out of range,
+ *               it will be pinned to be within 0 <= index <= textLength
+ * @param  nativeLimit the native string index of the position following the last
+ *               character to extract.  If the specified index is out of range,
+ *               it will be pinned to be within 0 <= index <= textLength.
+ *               nativeLimit must be >= nativeStart.
+ * @param  dest  the UChar (UTF-16) buffer into which the extracted text is placed
+ * @param  destCapacity  The size, in UChars, of the destination buffer.  May be zero
+ *               for precomputing the required size.
+ * @param  status receives any error status.
+ *         U_BUFFER_OVERFLOW_ERROR: the extracted text was truncated because the 
+ *         buffer was too small.  Returns number of UChars for preflighting.
+ * @return Number of UChars in the data to be extracted.  Does not include a trailing NUL.
+ *
+ * @stable ICU 3.4
+ */
+U_STABLE int32_t U_EXPORT2
+utext_extract(UText *ut,
+             int64_t nativeStart, int64_t nativeLimit,
+             UChar *dest, int32_t destCapacity,
+             UErrorCode *status) __INTRODUCED_IN(31);
+
+#endif // !defined(__ANDROID__) || __ANDROID_API__ >= 31
+
+
+
+
+
+U_CDECL_END
+
+
+
+#endif
diff --git a/libicu/src/shim.cpp b/libicu/src/shim.cpp
index b36b487..7a0642b 100644
--- a/libicu/src/shim.cpp
+++ b/libicu/src/shim.cpp
@@ -3,10 +3,17 @@
 // © 2018 and later: Unicode, Inc. and others.'
 // License & terms of use: http://www.unicode.org/copyright.html
 
+#include <unicode/ubidi.h>
+#include <unicode/ubrk.h>
 #include <unicode/uchar.h>
+#include <unicode/uenum.h>
+#include <unicode/uldnames.h>
 #include <unicode/uloc.h>
 #include <unicode/ulocdata.h>
+#include <unicode/unorm2.h>
+#include <unicode/uscript.h>
 #include <unicode/ustring.h>
+#include <unicode/utext.h>
 #include <unicode/utypes.h>
 #include <unicode/uversion.h>
 
@@ -119,6 +126,84 @@
 #undef u_totitle
 #undef u_toupper
 #undef u_versionToString
+#undef ubidi_close
+#undef ubidi_countParagraphs
+#undef ubidi_countRuns
+#undef ubidi_getBaseDirection
+#undef ubidi_getClassCallback
+#undef ubidi_getCustomizedClass
+#undef ubidi_getDirection
+#undef ubidi_getLength
+#undef ubidi_getLevelAt
+#undef ubidi_getLevels
+#undef ubidi_getLogicalIndex
+#undef ubidi_getLogicalMap
+#undef ubidi_getLogicalRun
+#undef ubidi_getParaLevel
+#undef ubidi_getParagraph
+#undef ubidi_getParagraphByIndex
+#undef ubidi_getProcessedLength
+#undef ubidi_getReorderingMode
+#undef ubidi_getReorderingOptions
+#undef ubidi_getResultLength
+#undef ubidi_getText
+#undef ubidi_getVisualIndex
+#undef ubidi_getVisualMap
+#undef ubidi_getVisualRun
+#undef ubidi_invertMap
+#undef ubidi_isInverse
+#undef ubidi_isOrderParagraphsLTR
+#undef ubidi_open
+#undef ubidi_openSized
+#undef ubidi_orderParagraphsLTR
+#undef ubidi_reorderLogical
+#undef ubidi_reorderVisual
+#undef ubidi_setClassCallback
+#undef ubidi_setContext
+#undef ubidi_setInverse
+#undef ubidi_setLine
+#undef ubidi_setPara
+#undef ubidi_setReorderingMode
+#undef ubidi_setReorderingOptions
+#undef ubidi_writeReordered
+#undef ubidi_writeReverse
+#undef ubrk_close
+#undef ubrk_countAvailable
+#undef ubrk_current
+#undef ubrk_first
+#undef ubrk_following
+#undef ubrk_getAvailable
+#undef ubrk_getRuleStatus
+#undef ubrk_getRuleStatusVec
+#undef ubrk_isBoundary
+#undef ubrk_last
+#undef ubrk_next
+#undef ubrk_open
+#undef ubrk_preceding
+#undef ubrk_previous
+#undef ubrk_setText
+#undef ubrk_setUText
+#undef uenum_close
+#undef uenum_count
+#undef uenum_next
+#undef uenum_openCharStringsEnumeration
+#undef uenum_openUCharStringsEnumeration
+#undef uenum_reset
+#undef uenum_unext
+#undef uldn_close
+#undef uldn_getContext
+#undef uldn_getDialectHandling
+#undef uldn_getLocale
+#undef uldn_keyDisplayName
+#undef uldn_keyValueDisplayName
+#undef uldn_languageDisplayName
+#undef uldn_localeDisplayName
+#undef uldn_open
+#undef uldn_openForContext
+#undef uldn_regionDisplayName
+#undef uldn_scriptCodeDisplayName
+#undef uldn_scriptDisplayName
+#undef uldn_variantDisplayName
 #undef uloc_acceptLanguage
 #undef uloc_addLikelySubtags
 #undef uloc_canonicalize
@@ -156,6 +241,52 @@
 #undef uloc_toUnicodeLocaleKey
 #undef uloc_toUnicodeLocaleType
 #undef ulocdata_getCLDRVersion
+#undef unorm2_append
+#undef unorm2_close
+#undef unorm2_composePair
+#undef unorm2_getCombiningClass
+#undef unorm2_getDecomposition
+#undef unorm2_getNFCInstance
+#undef unorm2_getNFDInstance
+#undef unorm2_getNFKCCasefoldInstance
+#undef unorm2_getNFKCInstance
+#undef unorm2_getNFKDInstance
+#undef unorm2_getRawDecomposition
+#undef unorm2_hasBoundaryAfter
+#undef unorm2_hasBoundaryBefore
+#undef unorm2_isInert
+#undef unorm2_isNormalized
+#undef unorm2_normalize
+#undef unorm2_normalizeSecondAndAppend
+#undef unorm2_quickCheck
+#undef unorm2_spanQuickCheckYes
+#undef uscript_breaksBetweenLetters
+#undef uscript_getCode
+#undef uscript_getName
+#undef uscript_getSampleString
+#undef uscript_getScript
+#undef uscript_getScriptExtensions
+#undef uscript_getShortName
+#undef uscript_getUsage
+#undef uscript_hasScript
+#undef uscript_isCased
+#undef uscript_isRightToLeft
+#undef utext_char32At
+#undef utext_clone
+#undef utext_close
+#undef utext_current32
+#undef utext_equals
+#undef utext_extract
+#undef utext_getNativeIndex
+#undef utext_moveIndex32
+#undef utext_nativeLength
+#undef utext_next32
+#undef utext_next32From
+#undef utext_openUChars
+#undef utext_openUTF8
+#undef utext_previous32
+#undef utext_previous32From
+#undef utext_setNativeIndex
 
 extern "C" {
 void u_charAge(UChar32 c, UVersionInfo versionArray) {
@@ -482,6 +613,240 @@
 void u_versionToString(const UVersionInfo versionArray, char * versionString) {
   U_ICU_ENTRY_POINT_RENAME(u_versionToString)(versionArray, versionString);
 }
+void ubidi_close(UBiDi * pBiDi) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_close)(pBiDi);
+}
+int32_t ubidi_countParagraphs(UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_countParagraphs)(pBiDi);
+}
+int32_t ubidi_countRuns(UBiDi * pBiDi, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_countRuns)(pBiDi, pErrorCode);
+}
+UBiDiDirection ubidi_getBaseDirection(const UChar * text, int32_t length) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getBaseDirection)(text, length);
+}
+void ubidi_getClassCallback(UBiDi * pBiDi, UBiDiClassCallback ** fn, const void ** context) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_getClassCallback)(pBiDi, fn, context);
+}
+UCharDirection ubidi_getCustomizedClass(UBiDi * pBiDi, UChar32 c) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getCustomizedClass)(pBiDi, c);
+}
+UBiDiDirection ubidi_getDirection(const UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getDirection)(pBiDi);
+}
+int32_t ubidi_getLength(const UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getLength)(pBiDi);
+}
+UBiDiLevel ubidi_getLevelAt(const UBiDi * pBiDi, int32_t charIndex) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getLevelAt)(pBiDi, charIndex);
+}
+const UBiDiLevel * ubidi_getLevels(UBiDi * pBiDi, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getLevels)(pBiDi, pErrorCode);
+}
+int32_t ubidi_getLogicalIndex(UBiDi * pBiDi, int32_t visualIndex, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalIndex)(pBiDi, visualIndex, pErrorCode);
+}
+void ubidi_getLogicalMap(UBiDi * pBiDi, int32_t * indexMap, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalMap)(pBiDi, indexMap, pErrorCode);
+}
+void ubidi_getLogicalRun(const UBiDi * pBiDi, int32_t logicalPosition, int32_t * pLogicalLimit, UBiDiLevel * pLevel) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalRun)(pBiDi, logicalPosition, pLogicalLimit, pLevel);
+}
+UBiDiLevel ubidi_getParaLevel(const UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevel)(pBiDi);
+}
+int32_t ubidi_getParagraph(const UBiDi * pBiDi, int32_t charIndex, int32_t * pParaStart, int32_t * pParaLimit, UBiDiLevel * pParaLevel, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraph)(pBiDi, charIndex, pParaStart, pParaLimit, pParaLevel, pErrorCode);
+}
+void ubidi_getParagraphByIndex(const UBiDi * pBiDi, int32_t paraIndex, int32_t * pParaStart, int32_t * pParaLimit, UBiDiLevel * pParaLevel, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraphByIndex)(pBiDi, paraIndex, pParaStart, pParaLimit, pParaLevel, pErrorCode);
+}
+int32_t ubidi_getProcessedLength(const UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getProcessedLength)(pBiDi);
+}
+UBiDiReorderingMode ubidi_getReorderingMode(UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingMode)(pBiDi);
+}
+uint32_t ubidi_getReorderingOptions(UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingOptions)(pBiDi);
+}
+int32_t ubidi_getResultLength(const UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getResultLength)(pBiDi);
+}
+const UChar * ubidi_getText(const UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getText)(pBiDi);
+}
+int32_t ubidi_getVisualIndex(UBiDi * pBiDi, int32_t logicalIndex, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualIndex)(pBiDi, logicalIndex, pErrorCode);
+}
+void ubidi_getVisualMap(UBiDi * pBiDi, int32_t * indexMap, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualMap)(pBiDi, indexMap, pErrorCode);
+}
+UBiDiDirection ubidi_getVisualRun(UBiDi * pBiDi, int32_t runIndex, int32_t * pLogicalStart, int32_t * pLength) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualRun)(pBiDi, runIndex, pLogicalStart, pLength);
+}
+void ubidi_invertMap(const int32_t * srcMap, int32_t * destMap, int32_t length) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_invertMap)(srcMap, destMap, length);
+}
+UBool ubidi_isInverse(UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_isInverse)(pBiDi);
+}
+UBool ubidi_isOrderParagraphsLTR(UBiDi * pBiDi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_isOrderParagraphsLTR)(pBiDi);
+}
+UBiDi * ubidi_open() {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_open)();
+}
+UBiDi * ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_openSized)(maxLength, maxRunCount, pErrorCode);
+}
+void ubidi_orderParagraphsLTR(UBiDi * pBiDi, UBool orderParagraphsLTR) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_orderParagraphsLTR)(pBiDi, orderParagraphsLTR);
+}
+void ubidi_reorderLogical(const UBiDiLevel * levels, int32_t length, int32_t * indexMap) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_reorderLogical)(levels, length, indexMap);
+}
+void ubidi_reorderVisual(const UBiDiLevel * levels, int32_t length, int32_t * indexMap) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_reorderVisual)(levels, length, indexMap);
+}
+void ubidi_setClassCallback(UBiDi * pBiDi, UBiDiClassCallback * newFn, const void * newContext, UBiDiClassCallback ** oldFn, const void ** oldContext, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setClassCallback)(pBiDi, newFn, newContext, oldFn, oldContext, pErrorCode);
+}
+void ubidi_setContext(UBiDi * pBiDi, const UChar * prologue, int32_t proLength, const UChar * epilogue, int32_t epiLength, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setContext)(pBiDi, prologue, proLength, epilogue, epiLength, pErrorCode);
+}
+void ubidi_setInverse(UBiDi * pBiDi, UBool isInverse) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setInverse)(pBiDi, isInverse);
+}
+void ubidi_setLine(const UBiDi * pParaBiDi, int32_t start, int32_t limit, UBiDi * pLineBiDi, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setLine)(pParaBiDi, start, limit, pLineBiDi, pErrorCode);
+}
+void ubidi_setPara(UBiDi * pBiDi, const UChar * text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel * embeddingLevels, UErrorCode * pErrorCode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setPara)(pBiDi, text, length, paraLevel, embeddingLevels, pErrorCode);
+}
+void ubidi_setReorderingMode(UBiDi * pBiDi, UBiDiReorderingMode reorderingMode) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingMode)(pBiDi, reorderingMode);
+}
+void ubidi_setReorderingOptions(UBiDi * pBiDi, uint32_t reorderingOptions) {
+  U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingOptions)(pBiDi, reorderingOptions);
+}
+int32_t ubidi_writeReordered(UBiDi * pBiDi, UChar * dest, int32_t destSize, uint16_t options, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_writeReordered)(pBiDi, dest, destSize, options, pErrorCode);
+}
+int32_t ubidi_writeReverse(const UChar * src, int32_t srcLength, UChar * dest, int32_t destSize, uint16_t options, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(ubidi_writeReverse)(src, srcLength, dest, destSize, options, pErrorCode);
+}
+void ubrk_close(UBreakIterator * bi) {
+  U_ICU_ENTRY_POINT_RENAME(ubrk_close)(bi);
+}
+int32_t ubrk_countAvailable() {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_countAvailable)();
+}
+int32_t ubrk_current(const UBreakIterator * bi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_current)(bi);
+}
+int32_t ubrk_first(UBreakIterator * bi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_first)(bi);
+}
+int32_t ubrk_following(UBreakIterator * bi, int32_t offset) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_following)(bi, offset);
+}
+const char * ubrk_getAvailable(int32_t index) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_getAvailable)(index);
+}
+int32_t ubrk_getRuleStatus(UBreakIterator * bi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus)(bi);
+}
+int32_t ubrk_getRuleStatusVec(UBreakIterator * bi, int32_t * fillInVec, int32_t capacity, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVec)(bi, fillInVec, capacity, status);
+}
+UBool ubrk_isBoundary(UBreakIterator * bi, int32_t offset) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary)(bi, offset);
+}
+int32_t ubrk_last(UBreakIterator * bi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_last)(bi);
+}
+int32_t ubrk_next(UBreakIterator * bi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_next)(bi);
+}
+UBreakIterator * ubrk_open(UBreakIteratorType type, const char * locale, const UChar * text, int32_t textLength, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_open)(type, locale, text, textLength, status);
+}
+int32_t ubrk_preceding(UBreakIterator * bi, int32_t offset) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_preceding)(bi, offset);
+}
+int32_t ubrk_previous(UBreakIterator * bi) {
+  return U_ICU_ENTRY_POINT_RENAME(ubrk_previous)(bi);
+}
+void ubrk_setText(UBreakIterator * bi, const UChar * text, int32_t textLength, UErrorCode * status) {
+  U_ICU_ENTRY_POINT_RENAME(ubrk_setText)(bi, text, textLength, status);
+}
+void ubrk_setUText(UBreakIterator * bi, UText * text, UErrorCode * status) {
+  U_ICU_ENTRY_POINT_RENAME(ubrk_setUText)(bi, text, status);
+}
+void uenum_close(UEnumeration * en) {
+  U_ICU_ENTRY_POINT_RENAME(uenum_close)(en);
+}
+int32_t uenum_count(UEnumeration * en, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(uenum_count)(en, status);
+}
+const char * uenum_next(UEnumeration * en, int32_t * resultLength, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(uenum_next)(en, resultLength, status);
+}
+UEnumeration * uenum_openCharStringsEnumeration(const char *const  strings[], int32_t count, UErrorCode * ec) {
+  return U_ICU_ENTRY_POINT_RENAME(uenum_openCharStringsEnumeration)(strings, count, ec);
+}
+UEnumeration * uenum_openUCharStringsEnumeration(const UChar *const  strings[], int32_t count, UErrorCode * ec) {
+  return U_ICU_ENTRY_POINT_RENAME(uenum_openUCharStringsEnumeration)(strings, count, ec);
+}
+void uenum_reset(UEnumeration * en, UErrorCode * status) {
+  U_ICU_ENTRY_POINT_RENAME(uenum_reset)(en, status);
+}
+const UChar * uenum_unext(UEnumeration * en, int32_t * resultLength, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(uenum_unext)(en, resultLength, status);
+}
+void uldn_close(ULocaleDisplayNames * ldn) {
+  U_ICU_ENTRY_POINT_RENAME(uldn_close)(ldn);
+}
+UDisplayContext uldn_getContext(const ULocaleDisplayNames * ldn, UDisplayContextType type, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_getContext)(ldn, type, pErrorCode);
+}
+UDialectHandling uldn_getDialectHandling(const ULocaleDisplayNames * ldn) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHandling)(ldn);
+}
+const char * uldn_getLocale(const ULocaleDisplayNames * ldn) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_getLocale)(ldn);
+}
+int32_t uldn_keyDisplayName(const ULocaleDisplayNames * ldn, const char * key, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName)(ldn, key, result, maxResultSize, pErrorCode);
+}
+int32_t uldn_keyValueDisplayName(const ULocaleDisplayNames * ldn, const char * key, const char * value, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisplayName)(ldn, key, value, result, maxResultSize, pErrorCode);
+}
+int32_t uldn_languageDisplayName(const ULocaleDisplayNames * ldn, const char * lang, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_languageDisplayName)(ldn, lang, result, maxResultSize, pErrorCode);
+}
+int32_t uldn_localeDisplayName(const ULocaleDisplayNames * ldn, const char * locale, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayName)(ldn, locale, result, maxResultSize, pErrorCode);
+}
+ULocaleDisplayNames * uldn_open(const char * locale, UDialectHandling dialectHandling, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_open)(locale, dialectHandling, pErrorCode);
+}
+ULocaleDisplayNames * uldn_openForContext(const char * locale, UDisplayContext * contexts, int32_t length, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_openForContext)(locale, contexts, length, pErrorCode);
+}
+int32_t uldn_regionDisplayName(const ULocaleDisplayNames * ldn, const char * region, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayName)(ldn, region, result, maxResultSize, pErrorCode);
+}
+int32_t uldn_scriptCodeDisplayName(const ULocaleDisplayNames * ldn, UScriptCode scriptCode, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_scriptCodeDisplayName)(ldn, scriptCode, result, maxResultSize, pErrorCode);
+}
+int32_t uldn_scriptDisplayName(const ULocaleDisplayNames * ldn, const char * script, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayName)(ldn, script, result, maxResultSize, pErrorCode);
+}
+int32_t uldn_variantDisplayName(const ULocaleDisplayNames * ldn, const char * variant, UChar * result, int32_t maxResultSize, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uldn_variantDisplayName)(ldn, variant, result, maxResultSize, pErrorCode);
+}
 int32_t uloc_acceptLanguage(char * result, int32_t resultAvailable, UAcceptResult * outResult, const char ** acceptList, int32_t acceptListCount, UEnumeration * availableLocales, UErrorCode * status) {
   return U_ICU_ENTRY_POINT_RENAME(uloc_acceptLanguage)(result, resultAvailable, outResult, acceptList, acceptListCount, availableLocales, status);
 }
@@ -593,4 +958,142 @@
 void ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode * status) {
   U_ICU_ENTRY_POINT_RENAME(ulocdata_getCLDRVersion)(versionArray, status);
 }
+int32_t unorm2_append(const UNormalizer2 * norm2, UChar * first, int32_t firstLength, int32_t firstCapacity, const UChar * second, int32_t secondLength, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_append)(norm2, first, firstLength, firstCapacity, second, secondLength, pErrorCode);
+}
+void unorm2_close(UNormalizer2 * norm2) {
+  U_ICU_ENTRY_POINT_RENAME(unorm2_close)(norm2);
+}
+UChar32 unorm2_composePair(const UNormalizer2 * norm2, UChar32 a, UChar32 b) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_composePair)(norm2, a, b);
+}
+uint8_t unorm2_getCombiningClass(const UNormalizer2 * norm2, UChar32 c) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getCombiningClass)(norm2, c);
+}
+int32_t unorm2_getDecomposition(const UNormalizer2 * norm2, UChar32 c, UChar * decomposition, int32_t capacity, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getDecomposition)(norm2, c, decomposition, capacity, pErrorCode);
+}
+const UNormalizer2 * unorm2_getNFCInstance(UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstance)(pErrorCode);
+}
+const UNormalizer2 * unorm2_getNFDInstance(UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstance)(pErrorCode);
+}
+const UNormalizer2 * unorm2_getNFKCCasefoldInstance(UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCCasefoldInstance)(pErrorCode);
+}
+const UNormalizer2 * unorm2_getNFKCInstance(UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInstance)(pErrorCode);
+}
+const UNormalizer2 * unorm2_getNFKDInstance(UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInstance)(pErrorCode);
+}
+int32_t unorm2_getRawDecomposition(const UNormalizer2 * norm2, UChar32 c, UChar * decomposition, int32_t capacity, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDecomposition)(norm2, c, decomposition, capacity, pErrorCode);
+}
+UBool unorm2_hasBoundaryAfter(const UNormalizer2 * norm2, UChar32 c) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter)(norm2, c);
+}
+UBool unorm2_hasBoundaryBefore(const UNormalizer2 * norm2, UChar32 c) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryBefore)(norm2, c);
+}
+UBool unorm2_isInert(const UNormalizer2 * norm2, UChar32 c) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_isInert)(norm2, c);
+}
+UBool unorm2_isNormalized(const UNormalizer2 * norm2, const UChar * s, int32_t length, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized)(norm2, s, length, pErrorCode);
+}
+int32_t unorm2_normalize(const UNormalizer2 * norm2, const UChar * src, int32_t length, UChar * dest, int32_t capacity, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_normalize)(norm2, src, length, dest, capacity, pErrorCode);
+}
+int32_t unorm2_normalizeSecondAndAppend(const UNormalizer2 * norm2, UChar * first, int32_t firstLength, int32_t firstCapacity, const UChar * second, int32_t secondLength, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_normalizeSecondAndAppend)(norm2, first, firstLength, firstCapacity, second, secondLength, pErrorCode);
+}
+UNormalizationCheckResult unorm2_quickCheck(const UNormalizer2 * norm2, const UChar * s, int32_t length, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck)(norm2, s, length, pErrorCode);
+}
+int32_t unorm2_spanQuickCheckYes(const UNormalizer2 * norm2, const UChar * s, int32_t length, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickCheckYes)(norm2, s, length, pErrorCode);
+}
+UBool uscript_breaksBetweenLetters(UScriptCode script) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_breaksBetweenLetters)(script);
+}
+int32_t uscript_getCode(const char * nameOrAbbrOrLocale, UScriptCode * fillIn, int32_t capacity, UErrorCode * err) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getCode)(nameOrAbbrOrLocale, fillIn, capacity, err);
+}
+const char * uscript_getName(UScriptCode scriptCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getName)(scriptCode);
+}
+int32_t uscript_getSampleString(UScriptCode script, UChar * dest, int32_t capacity, UErrorCode * pErrorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getSampleString)(script, dest, capacity, pErrorCode);
+}
+UScriptCode uscript_getScript(UChar32 codepoint, UErrorCode * err) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getScript)(codepoint, err);
+}
+int32_t uscript_getScriptExtensions(UChar32 c, UScriptCode * scripts, int32_t capacity, UErrorCode * errorCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getScriptExtensions)(c, scripts, capacity, errorCode);
+}
+const char * uscript_getShortName(UScriptCode scriptCode) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getShortName)(scriptCode);
+}
+UScriptUsage uscript_getUsage(UScriptCode script) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_getUsage)(script);
+}
+UBool uscript_hasScript(UChar32 c, UScriptCode sc) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_hasScript)(c, sc);
+}
+UBool uscript_isCased(UScriptCode script) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_isCased)(script);
+}
+UBool uscript_isRightToLeft(UScriptCode script) {
+  return U_ICU_ENTRY_POINT_RENAME(uscript_isRightToLeft)(script);
+}
+UChar32 utext_char32At(UText * ut, int64_t nativeIndex) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_char32At)(ut, nativeIndex);
+}
+UText * utext_clone(UText * dest, const UText * src, UBool deep, UBool readOnly, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_clone)(dest, src, deep, readOnly, status);
+}
+UText * utext_close(UText * ut) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_close)(ut);
+}
+UChar32 utext_current32(UText * ut) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_current32)(ut);
+}
+UBool utext_equals(const UText * a, const UText * b) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_equals)(a, b);
+}
+int32_t utext_extract(UText * ut, int64_t nativeStart, int64_t nativeLimit, UChar * dest, int32_t destCapacity, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_extract)(ut, nativeStart, nativeLimit, dest, destCapacity, status);
+}
+int64_t utext_getNativeIndex(const UText * ut) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex)(ut);
+}
+UBool utext_moveIndex32(UText * ut, int32_t delta) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_moveIndex32)(ut, delta);
+}
+int64_t utext_nativeLength(UText * ut) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_nativeLength)(ut);
+}
+UChar32 utext_next32(UText * ut) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_next32)(ut);
+}
+UChar32 utext_next32From(UText * ut, int64_t nativeIndex) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_next32From)(ut, nativeIndex);
+}
+UText * utext_openUChars(UText * ut, const UChar * s, int64_t length, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_openUChars)(ut, s, length, status);
+}
+UText * utext_openUTF8(UText * ut, const char * s, int64_t length, UErrorCode * status) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_openUTF8)(ut, s, length, status);
+}
+UChar32 utext_previous32(UText * ut) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_previous32)(ut);
+}
+UChar32 utext_previous32From(UText * ut, int64_t nativeIndex) {
+  return U_ICU_ENTRY_POINT_RENAME(utext_previous32From)(ut, nativeIndex);
+}
+void utext_setNativeIndex(UText * ut, int64_t nativeIndex) {
+  U_ICU_ENTRY_POINT_RENAME(utext_setNativeIndex)(ut, nativeIndex);
+}
 }
\ No newline at end of file
diff --git a/tools/icu4c_srcgen/doc_patches/patches/unicode/utext.h.patch b/tools/icu4c_srcgen/doc_patches/patches/unicode/utext.h.patch
new file mode 100644
index 0000000..d16abf9
--- /dev/null
+++ b/tools/icu4c_srcgen/doc_patches/patches/unicode/utext.h.patch
@@ -0,0 +1,790 @@
+--- libicu/ndk_headers/unicode/utext.h	2020-11-21 00:51:06.071856434 +0000
++++ libicu/ndk_headers/unicode/utext.h	2020-11-21 00:50:57.371794900 +0000
+@@ -676,787 +676,6 @@
+ 
+ 
+ 
+-/************************************************************************************
+- *
+- *  #define inline versions of selected performance-critical text access functions
+- *          Caution:  do not use auto increment++ or decrement-- expressions
+- *                    as parameters to these macros.
+- *
+- *          For most use, where there is no extreme performance constraint, the
+- *          normal, non-inline functions are a better choice.  The resulting code
+- *          will be smaller, and, if the need ever arises, easier to debug.
+- *
+- *          These are implemented as #defines rather than real functions
+- *          because there is no fully portable way to do inline functions in plain C.
+- *
+- ************************************************************************************/
+-
+-#ifndef U_HIDE_INTERNAL_API
+-/**
+- * inline version of utext_current32(), for performance-critical situations.
+- *
+- * Get the code point at the current iteration position of the UText.
+- * Returns U_SENTINEL (-1) if the position is at the end of the
+- * text.
+- *
+- * @internal ICU 4.4 technology preview
+- */
+-#define UTEXT_CURRENT32(ut)  \
+-    ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->chunkOffset]<0xd800 ? \
+-    ((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut))
+-#endif  /* U_HIDE_INTERNAL_API */
+-
+-/**
+- * inline version of utext_next32(), for performance-critical situations.
+- *
+- * Get the code point at the current iteration position of the UText, and
+- * advance the position to the first index following the character.
+- * This is a post-increment operation.
+- * Returns U_SENTINEL (-1) if the position is at the end of the
+- * text.
+- *
+- * @stable ICU 3.4
+- */
+-#define UTEXT_NEXT32(ut)  \
+-    ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->chunkOffset]<0xd800 ? \
+-    ((ut)->chunkContents)[((ut)->chunkOffset)++] : utext_next32(ut))
+-
+-/**
+- * inline version of utext_previous32(), for performance-critical situations.
+- *
+- *  Move the iterator position to the character (code point) whose
+- *  index precedes the current position, and return that character.
+- *  This is a pre-decrement operation.
+- *  Returns U_SENTINEL (-1) if the position is at the start of the  text.
+- *
+- * @stable ICU 3.4
+- */
+-#define UTEXT_PREVIOUS32(ut)  \
+-    ((ut)->chunkOffset > 0 && \
+-     (ut)->chunkContents[(ut)->chunkOffset-1] < 0xd800 ? \
+-          (ut)->chunkContents[--((ut)->chunkOffset)]  :  utext_previous32(ut))
+-
+-/**
+-  *  inline version of utext_getNativeIndex(), for performance-critical situations.
+-  *
+-  * Get the current iterator position, which can range from 0 to 
+-  * the length of the text.
+-  * The position is a native index into the input text, in whatever format it
+-  * may have (possibly UTF-8 for example), and may not always be the same as
+-  * the corresponding UChar (UTF-16) index.
+-  * The returned position will always be aligned to a code point boundary. 
+-  *
+-  * @stable ICU 3.6
+-  */
+-#define UTEXT_GETNATIVEINDEX(ut)                       \
+-    ((ut)->chunkOffset <= (ut)->nativeIndexingLimit?   \
+-        (ut)->chunkNativeStart+(ut)->chunkOffset :     \
+-        (ut)->pFuncs->mapOffsetToNative(ut))    
+-
+-/**
+-  *  inline version of utext_setNativeIndex(), for performance-critical situations.
+-  *
+-  * Set the current iteration position to the nearest code point
+-  * boundary at or preceding the specified index.
+-  * The index is in the native units of the original input text.
+-  * If the index is out of range, it will be pinned to be within
+-  * the range of the input text.
+-  *
+-  * @stable ICU 3.8
+-  */
+-#define UTEXT_SETNATIVEINDEX(ut, ix) UPRV_BLOCK_MACRO_BEGIN { \
+-    int64_t __offset = (ix) - (ut)->chunkNativeStart; \
+-    if (__offset>=0 && __offset<(int64_t)(ut)->nativeIndexingLimit && (ut)->chunkContents[__offset]<0xdc00) { \
+-        (ut)->chunkOffset=(int32_t)__offset; \
+-    } else { \
+-        utext_setNativeIndex((ut), (ix)); \
+-    } \
+-} UPRV_BLOCK_MACRO_END
+-
+-
+-
+-/************************************************************************************
+- *
+- *   Functions related to writing or modifying the text.
+- *   These will work only with modifiable UTexts.  Attempting to
+- *   modify a read-only UText will return an error status.
+- *
+- ************************************************************************************/
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-/**
+- * UText provider properties (bit field indexes).
+- *
+- * @see UText
+- * @stable ICU 3.4
+- */
+-enum {
+-    /**
+-     * It is potentially time consuming for the provider to determine the length of the text.
+-     * @stable ICU 3.4
+-     */
+-    UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE = 1,
+-    /**
+-     * Text chunks remain valid and usable until the text object is modified or
+-     * deleted, not just until the next time the access() function is called
+-     * (which is the default).
+-     * @stable ICU 3.4
+-     */
+-    UTEXT_PROVIDER_STABLE_CHUNKS = 2,
+-    /**
+-     * The provider supports modifying the text via the replace() and copy()
+-     * functions.
+-     * @see Replaceable
+-     * @stable ICU 3.4
+-     */
+-    UTEXT_PROVIDER_WRITABLE = 3,
+-    /**
+-     * There is meta data associated with the text.
+-     * @see Replaceable::hasMetaData()
+-     * @stable ICU 3.4
+-     */ 
+-    UTEXT_PROVIDER_HAS_META_DATA = 4,
+-    /**
+-     * Text provider owns the text storage.
+-     *  Generally occurs as the result of a deep clone of the UText.
+-     *  When closing the UText, the associated text must
+-     *  also be closed/deleted/freed/ whatever is appropriate.
+-     * @stable ICU 3.6
+-     */
+-     UTEXT_PROVIDER_OWNS_TEXT = 5
+-};
+-
+-/**
+-  * Function type declaration for UText.clone().
+-  *
+-  *  clone a UText.  Much like opening a UText where the source text is itself
+-  *  another UText.
+-  *
+-  *  A deep clone will copy both the UText data structures and the underlying text.
+-  *  The original and cloned UText will operate completely independently; modifications
+-  *  made to the text in one will not effect the other.  Text providers are not
+-  *  required to support deep clones.  The user of clone() must check the status return
+-  *  and be prepared to handle failures.
+-  *
+-  *  A shallow clone replicates only the UText data structures; it does not make
+-  *  a copy of the underlying text.  Shallow clones can be used as an efficient way to 
+-  *  have multiple iterators active in a single text string that is not being
+-  *  modified.
+-  *
+-  *  A shallow clone operation must not fail except for truly exceptional conditions such
+-  *  as memory allocation failures.
+-  *
+-  *  A UText and its clone may be safely concurrently accessed by separate threads.
+-  *  This is true for both shallow and deep clones.
+-  *  It is the responsibility of the Text Provider to ensure that this thread safety
+-  *  constraint is met.
+-
+-  *
+-  *  @param dest   A UText struct to be filled in with the result of the clone operation,
+-  *                or NULL if the clone function should heap-allocate a new UText struct.
+-  *  @param src    The UText to be cloned.
+-  *  @param deep   TRUE to request a deep clone, FALSE for a shallow clone.
+-  *  @param status Errors are returned here.  For deep clones, U_UNSUPPORTED_ERROR
+-  *                should be returned if the text provider is unable to clone the
+-  *                original text.
+-  *  @return       The newly created clone, or NULL if the clone operation failed.
+-  *
+-  * @stable ICU 3.4
+-  */
+-typedef UText * U_CALLCONV
+-UTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status);
+-
+-
+-/**
+- * Function type declaration for UText.nativeLength().
+- *
+- * @param ut the UText to get the length of.
+- * @return the length, in the native units of the original text string.
+- * @see UText
+- * @stable ICU 3.4
+- */
+-typedef int64_t U_CALLCONV
+-UTextNativeLength(UText *ut);
+-
+-/**
+- * Function type declaration for UText.access().  Get the description of the text chunk
+- *  containing the text at a requested native index.  The UText's iteration
+- *  position will be left at the requested index.  If the index is out
+- *  of bounds, the iteration position will be left at the start or end
+- *  of the string, as appropriate.
+- *
+- *  Chunks must begin and end on code point boundaries.  A single code point
+- *  comprised of multiple storage units must never span a chunk boundary.
+- *
+- *
+- * @param ut          the UText being accessed.
+- * @param nativeIndex Requested index of the text to be accessed.
+- * @param forward     If TRUE, then the returned chunk must contain text
+- *                    starting from the index, so that start<=index<limit.
+- *                    If FALSE, then the returned chunk must contain text
+- *                    before the index, so that start<index<=limit.
+- * @return            True if the requested index could be accessed.  The chunk
+- *                    will contain the requested text.
+- *                    False value if a chunk cannot be accessed
+- *                    (the requested index is out of bounds).
+- *
+- * @see UText
+- * @stable ICU 3.4
+- */
+-typedef UBool U_CALLCONV
+-UTextAccess(UText *ut, int64_t nativeIndex, UBool forward);
+-
+-/**
+- * Function type declaration for UText.extract().
+- *
+- * Extract text from a UText into a UChar buffer.  The range of text to be extracted
+- * is specified in the native indices of the UText provider.  These may not necessarily
+- * be UTF-16 indices.
+- * <p>
+- * The size (number of 16 bit UChars) in the data to be extracted is returned.  The
+- * full amount is returned, even when the specified buffer size is smaller.
+- * <p>
+- * The extracted string will (if you are a user) / must (if you are a text provider)
+- * be NUL-terminated if there is sufficient space in the destination buffer.
+- *
+- * @param  ut            the UText from which to extract data.
+- * @param  nativeStart   the native index of the first character to extract.
+- * @param  nativeLimit   the native string index of the position following the last
+- *                       character to extract.
+- * @param  dest          the UChar (UTF-16) buffer into which the extracted text is placed
+- * @param  destCapacity  The size, in UChars, of the destination buffer.  May be zero
+- *                       for precomputing the required size.
+- * @param  status        receives any error status.
+- *                       If U_BUFFER_OVERFLOW_ERROR: Returns number of UChars for
+- *                       preflighting.
+- * @return Number of UChars in the data.  Does not include a trailing NUL.
+- *
+- * @stable ICU 3.4
+- */
+-typedef int32_t U_CALLCONV
+-UTextExtract(UText *ut,
+-             int64_t nativeStart, int64_t nativeLimit,
+-             UChar *dest, int32_t destCapacity,
+-             UErrorCode *status);
+-
+-/**
+- * Function type declaration for UText.replace().
+- *
+- * Replace a range of the original text with a replacement text.
+- *
+- * Leaves the current iteration position at the position following the
+- *  newly inserted replacement text.
+- *
+- * This function need only be implemented on UText types that support writing.
+- *
+- * When using this function, there should be only a single UText opened onto the
+- * underlying native text string.  The function is responsible for updating the
+- * text chunk within the UText to reflect the updated iteration position,
+- * taking into account any changes to the underlying string's structure caused
+- * by the replace operation.
+- *
+- * @param ut               the UText representing the text to be operated on.
+- * @param nativeStart      the index of the start of the region to be replaced
+- * @param nativeLimit      the index of the character following the region to be replaced.
+- * @param replacementText  pointer to the replacement text
+- * @param replacmentLength length of the replacement text in UChars, or -1 if the text is NUL terminated.
+- * @param status           receives any error status.  Possible errors include
+- *                         U_NO_WRITE_PERMISSION
+- *
+- * @return The signed number of (native) storage units by which
+- *         the length of the text expanded or contracted.
+- *
+- * @stable ICU 3.4
+- */
+-typedef int32_t U_CALLCONV
+-UTextReplace(UText *ut,
+-             int64_t nativeStart, int64_t nativeLimit,
+-             const UChar *replacementText, int32_t replacmentLength,
+-             UErrorCode *status);
+-
+-/**
+- * Function type declaration for UText.copy().
+- *
+- * Copy or move a substring from one position to another within the text,
+- * while retaining any metadata associated with the text.
+- * This function is used to duplicate or reorder substrings.
+- * The destination index must not overlap the source range.
+- *
+- * The text to be copied or moved is inserted at destIndex;
+- * it does not replace or overwrite any existing text.
+- *
+- * This function need only be implemented for UText types that support writing.
+- *
+- * When using this function, there should be only a single UText opened onto the
+- * underlying native text string.  The function is responsible for updating the
+- * text chunk within the UText to reflect the updated iteration position,
+- * taking into account any changes to the underlying string's structure caused
+- * by the replace operation.
+- *
+- * @param ut           The UText representing the text to be operated on.
+- * @param nativeStart  The index of the start of the region to be copied or moved
+- * @param nativeLimit  The index of the character following the region to be replaced.
+- * @param nativeDest   The destination index to which the source substring is copied or moved.
+- * @param move         If TRUE, then the substring is moved, not copied/duplicated.
+- * @param status       receives any error status.  Possible errors include U_NO_WRITE_PERMISSION
+- *
+- * @stable ICU 3.4
+- */
+-typedef void U_CALLCONV
+-UTextCopy(UText *ut,
+-          int64_t nativeStart, int64_t nativeLimit,
+-          int64_t nativeDest,
+-          UBool move,
+-          UErrorCode *status);
+-
+-/**
+- * Function type declaration for UText.mapOffsetToNative().
+- * Map from the current UChar offset within the current text chunk to
+- *  the corresponding native index in the original source text.
+- *
+- * This is required only for text providers that do not use native UTF-16 indexes.
+- *
+- * @param ut     the UText.
+- * @return Absolute (native) index corresponding to chunkOffset in the current chunk.
+- *         The returned native index should always be to a code point boundary.
+- *
+- * @stable ICU 3.4
+- */
+-typedef int64_t U_CALLCONV
+-UTextMapOffsetToNative(const UText *ut);
+-
+-/**
+- * Function type declaration for UText.mapIndexToUTF16().
+- * Map from a native index to a UChar offset within a text chunk.
+- * Behavior is undefined if the native index does not fall within the
+- *   current chunk.
+- *
+- * This function is required only for text providers that do not use native UTF-16 indexes.
+- *
+- * @param ut          The UText containing the text chunk.
+- * @param nativeIndex Absolute (native) text index, chunk->start<=index<=chunk->limit.
+- * @return            Chunk-relative UTF-16 offset corresponding to the specified native
+- *                    index.
+- *
+- * @stable ICU 3.4
+- */
+-typedef int32_t U_CALLCONV
+-UTextMapNativeIndexToUTF16(const UText *ut, int64_t nativeIndex);
+-
+-
+-/**
+- * Function type declaration for UText.utextClose().
+- *
+- * A Text Provider close function is only required for provider types that make
+- *  allocations in their open function (or other functions) that must be 
+- *  cleaned when the UText is closed.
+- *
+- * The allocation of the UText struct itself and any "extra" storage
+- * associated with the UText is handled by the common UText implementation
+- * and does not require provider specific cleanup in a close function.
+- *
+- * Most UText provider implementations do not need to implement this function.
+- *
+- * @param ut A UText object to be closed.
+- *
+- * @stable ICU 3.4
+- */
+-typedef void U_CALLCONV
+-UTextClose(UText *ut);
+-
+-
+-/**
+-  *   (public)  Function dispatch table for UText.
+-  *             Conceptually very much like a C++ Virtual Function Table.
+-  *             This struct defines the organization of the table.
+-  *             Each text provider implementation must provide an
+-  *              actual table that is initialized with the appropriate functions
+-  *              for the type of text being handled.
+-  *   @stable ICU 3.6
+-  */
+-struct UTextFuncs {
+-    /**
+-     *   (public)  Function table size, sizeof(UTextFuncs)
+-     *             Intended for use should the table grow to accommodate added
+-     *             functions in the future, to allow tests for older format
+-     *             function tables that do not contain the extensions.
+-     *
+-     *             Fields are placed for optimal alignment on
+-     *             32/64/128-bit-pointer machines, by normally grouping together
+-     *             4 32-bit fields,
+-     *             4 pointers,
+-     *             2 64-bit fields
+-     *             in sequence.
+-     *   @stable ICU 3.6
+-     */
+-    int32_t       tableSize;
+-
+-    /**
+-      *   (private)  Alignment padding.
+-      *              Do not use, reserved for use by the UText framework only.
+-      *   @internal
+-      */
+-    int32_t       reserved1, /** @internal */ reserved2, /** @internal */ reserved3;
+-
+-
+-    /**
+-     * (public) Function pointer for UTextClone
+-     *
+-     * @see UTextClone
+-     * @stable ICU 3.6
+-     */
+-    UTextClone *clone;
+-
+-    /**
+-     * (public) function pointer for UTextLength
+-     * May be expensive to compute!
+-     *
+-     * @see UTextLength
+-     * @stable ICU 3.6
+-     */
+-    UTextNativeLength *nativeLength;
+-
+-    /**
+-     * (public) Function pointer for UTextAccess.
+-     *
+-     * @see UTextAccess
+-     * @stable ICU 3.6
+-     */
+-    UTextAccess *access;
+-
+-    /**
+-     * (public) Function pointer for UTextExtract.
+-     *
+-     * @see UTextExtract
+-     * @stable ICU 3.6
+-     */
+-    UTextExtract *extract;
+-
+-    /**
+-     * (public) Function pointer for UTextReplace.
+-     *
+-     * @see UTextReplace
+-     * @stable ICU 3.6
+-     */
+-    UTextReplace *replace;
+-
+-    /**
+-     * (public) Function pointer for UTextCopy.
+-     *
+-     * @see UTextCopy
+-     * @stable ICU 3.6
+-     */
+-    UTextCopy *copy;
+-
+-    /**
+-     * (public) Function pointer for UTextMapOffsetToNative.
+-     *
+-     * @see UTextMapOffsetToNative
+-     * @stable ICU 3.6
+-     */
+-    UTextMapOffsetToNative *mapOffsetToNative;
+-
+-    /**
+-     * (public) Function pointer for UTextMapNativeIndexToUTF16.
+-     *
+-     * @see UTextMapNativeIndexToUTF16
+-     * @stable ICU 3.6
+-     */
+-    UTextMapNativeIndexToUTF16 *mapNativeIndexToUTF16;
+-
+-    /**
+-     * (public) Function pointer for UTextClose.
+-      *
+-      * @see UTextClose
+-      * @stable ICU 3.6
+-      */
+-    UTextClose  *close;
+-
+-    /**
+-      * (private)  Spare function pointer
+-      * @internal
+-      */
+-    UTextClose  *spare1;
+-    
+-    /**
+-      * (private)  Spare function pointer
+-      * @internal
+-      */
+-    UTextClose  *spare2;
+-
+-    /**
+-      * (private)  Spare function pointer
+-      * @internal
+-      */
+-    UTextClose  *spare3;
+-
+-};
+-/**
+- * Function dispatch table for UText
+- * @see UTextFuncs
+- */
+-typedef struct UTextFuncs UTextFuncs;
+-
+- /**
+-  *   UText struct.  Provides the interface between the generic UText access code
+-  *                  and the UText provider code that works on specific kinds of
+-  *                  text  (UTF-8, noncontiguous UTF-16, whatever.)
+-  *
+-  *                  Applications that are using predefined types of text providers
+-  *                  to pass text data to ICU services will have no need to view the
+-  *                  internals of the UText structs that they open.
+-  *
+-  * @stable ICU 3.6
+-  */
+-struct UText {
+-    /**
+-     *     (private)  Magic.  Used to help detect when UText functions are handed
+-     *                        invalid or uninitialized UText structs.
+-     *                        utext_openXYZ() functions take an initialized,
+-     *                        but not necessarily open, UText struct as an
+-     *                        optional fill-in parameter.  This magic field
+-     *                        is used to check for that initialization.
+-     *                        Text provider close functions must NOT clear
+-     *                        the magic field because that would prevent
+-     *                        reuse of the UText struct.
+-     * @internal
+-     */
+-    uint32_t       magic;
+-
+-
+-    /**
+-     *     (private)  Flags for managing the allocation and freeing of
+-     *                memory associated with this UText.
+-     * @internal
+-     */
+-    int32_t        flags;
+-
+-
+-    /**
+-      *  Text provider properties.  This set of flags is maintained by the
+-      *                             text provider implementation.
+-      *  @stable ICU 3.4
+-      */
+-    int32_t         providerProperties;
+-
+-    /**
+-     * (public) sizeOfStruct=sizeof(UText)
+-     * Allows possible backward compatible extension.
+-     *
+-     * @stable ICU 3.4
+-     */
+-    int32_t         sizeOfStruct;
+-    
+-    /* ------ 16 byte alignment boundary -----------  */
+-    
+-
+-    /**
+-      *  (protected) Native index of the first character position following
+-      *              the current chunk.
+-      *  @stable ICU 3.6
+-      */
+-    int64_t         chunkNativeLimit;
+-
+-    /**
+-     *   (protected)  Size in bytes of the extra space (pExtra).
+-     *  @stable ICU 3.4
+-     */
+-    int32_t        extraSize;
+-
+-    /**
+-      *    (protected) The highest chunk offset where native indexing and
+-      *    chunk (UTF-16) indexing correspond.  For UTF-16 sources, value
+-      *    will be equal to chunkLength.
+-      *
+-      *    @stable ICU 3.6
+-      */
+-    int32_t         nativeIndexingLimit;
+-
+-    /* ---- 16 byte alignment boundary------ */
+-    
+-    /**
+-     *  (protected) Native index of the first character in the text chunk.
+-     *  @stable ICU 3.6
+-     */
+-    int64_t         chunkNativeStart;
+-
+-    /**
+-     *  (protected) Current iteration position within the text chunk (UTF-16 buffer).
+-     *  This is the index to the character that will be returned by utext_next32().
+-     *  @stable ICU 3.6
+-     */
+-    int32_t         chunkOffset;
+-
+-    /**
+-     *  (protected) Length the text chunk (UTF-16 buffer), in UChars.
+-     *  @stable ICU 3.6
+-     */
+-    int32_t         chunkLength;
+-
+-    /* ---- 16  byte alignment boundary-- */
+-    
+-
+-    /**
+-     *  (protected)  pointer to a chunk of text in UTF-16 format.
+-     *  May refer either to original storage of the source of the text, or
+-     *  if conversion was required, to a buffer owned by the UText.
+-     *  @stable ICU 3.6
+-     */
+-    const UChar    *chunkContents;
+-
+-     /**
+-      * (public)     Pointer to Dispatch table for accessing functions for this UText.
+-      * @stable ICU 3.6
+-      */
+-    const UTextFuncs     *pFuncs;
+-
+-    /**
+-     *  (protected)  Pointer to additional space requested by the
+-     *               text provider during the utext_open operation.
+-     * @stable ICU 3.4
+-     */
+-    void          *pExtra;
+-
+-    /**
+-     * (protected) Pointer to string or text-containing object or similar.
+-     * This is the source of the text that this UText is wrapping, in a format
+-     *  that is known to the text provider functions.
+-     * @stable ICU 3.4
+-     */
+-    const void   *context;
+-
+-    /* --- 16 byte alignment boundary--- */
+-
+-    /**
+-     * (protected) Pointer fields available for use by the text provider.
+-     * Not used by UText common code.
+-     * @stable ICU 3.6
+-     */
+-    const void     *p; 
+-    /**
+-     * (protected) Pointer fields available for use by the text provider.
+-     * Not used by UText common code.
+-     * @stable ICU 3.6
+-     */
+-    const void     *q;
+-     /**
+-     * (protected) Pointer fields available for use by the text provider.
+-     * Not used by UText common code.
+-     * @stable ICU 3.6
+-      */
+-    const void     *r;
+-
+-    /**
+-      *  Private field reserved for future use by the UText framework
+-      *     itself.  This is not to be touched by the text providers.
+-      * @internal ICU 3.4
+-      */
+-    void           *privP;
+-
+-
+-    /* --- 16 byte alignment boundary--- */
+-    
+-
+-    /**
+-      * (protected) Integer field reserved for use by the text provider.
+-      * Not used by the UText framework, or by the client (user) of the UText.
+-      * @stable ICU 3.4
+-      */
+-    int64_t         a;
+-
+-    /**
+-      * (protected) Integer field reserved for use by the text provider.
+-      * Not used by the UText framework, or by the client (user) of the UText.
+-      * @stable ICU 3.4
+-      */
+-    int32_t         b;
+-
+-    /**
+-      * (protected) Integer field reserved for use by the text provider.
+-      * Not used by the UText framework, or by the client (user) of the UText.
+-      * @stable ICU 3.4
+-      */
+-    int32_t         c;
+-
+-    /*  ---- 16 byte alignment boundary---- */
+-
+-
+-    /**
+-      *  Private field reserved for future use by the UText framework
+-      *     itself.  This is not to be touched by the text providers.
+-      * @internal ICU 3.4
+-      */
+-    int64_t         privA;
+-    /**
+-      *  Private field reserved for future use by the UText framework
+-      *     itself.  This is not to be touched by the text providers.
+-      * @internal ICU 3.4
+-      */
+-    int32_t         privB;
+-    /**
+-      *  Private field reserved for future use by the UText framework
+-      *     itself.  This is not to be touched by the text providers.
+-      * @internal ICU 3.4
+-      */
+-    int32_t         privC;
+-};
+-
+-
+-
+-
+-// do not use #ifndef U_HIDE_INTERNAL_API around the following!
+-/**
+-  * @internal
+-  *  Value used to help identify correctly initialized UText structs.
+-  *  Note:  must be publicly visible so that UTEXT_INITIALIZER can access it.
+-  */
+-enum {
+-    UTEXT_MAGIC = 0x345ad82c
+-};
+-
+-/**
+- * initializer to be used with local (stack) instances of a UText
+- *  struct.  UText structs must be initialized before passing
+- *  them to one of the utext_open functions.
+- *
+- * @stable ICU 3.6
+- */
+-#define UTEXT_INITIALIZER {                                        \
+-                  UTEXT_MAGIC,          /* magic                */ \
+-                  0,                    /* flags                */ \
+-                  0,                    /* providerProps        */ \
+-                  sizeof(UText),        /* sizeOfStruct         */ \
+-                  0,                    /* chunkNativeLimit     */ \
+-                  0,                    /* extraSize            */ \
+-                  0,                    /* nativeIndexingLimit  */ \
+-                  0,                    /* chunkNativeStart     */ \
+-                  0,                    /* chunkOffset          */ \
+-                  0,                    /* chunkLength          */ \
+-                  NULL,                 /* chunkContents        */ \
+-                  NULL,                 /* pFuncs               */ \
+-                  NULL,                 /* pExtra               */ \
+-                  NULL,                 /* context              */ \
+-                  NULL, NULL, NULL,     /* p, q, r              */ \
+-                  NULL,                 /* privP                */ \
+-                  0, 0, 0,              /* a, b, c              */ \
+-                  0, 0, 0               /* privA,B,C,           */ \
+-                  }
+ 
+ 
+ U_CDECL_END
diff --git a/tools/icu4c_srcgen/generate_ndk.py b/tools/icu4c_srcgen/generate_ndk.py
index 30e560c..7f54d7e 100755
--- a/tools/icu4c_srcgen/generate_ndk.py
+++ b/tools/icu4c_srcgen/generate_ndk.py
@@ -191,7 +191,9 @@
         out.write(modified)
 
 IGNORED_INCLUDE_DEPENDENCY = {
+    "ubrk.h": ["parseerr.h", ],
     "ulocdata.h": ["ures.h", "uset.h", ],
+    "unorm2.h": ["uset.h", ],
     "ustring.h": ["uiter.h", ],
 }
 
diff --git a/tools/icu4c_srcgen/libicu_export.txt b/tools/icu4c_srcgen/libicu_export.txt
index fc3c773..c084bef 100644
--- a/tools/icu4c_srcgen/libicu_export.txt
+++ b/tools/icu4c_srcgen/libicu_export.txt
@@ -125,6 +125,94 @@
 u_totitle
 u_toupper
 u_versionToString
+ubidi_close
+ubidi_countParagraphs
+ubidi_countRuns
+ubidi_getBaseDirection
+ubidi_getClassCallback
+ubidi_getCustomizedClass
+ubidi_getDirection
+ubidi_getLength
+ubidi_getLevelAt
+ubidi_getLevels
+ubidi_getLogicalIndex
+ubidi_getLogicalMap
+ubidi_getLogicalRun
+ubidi_getParaLevel
+ubidi_getParagraph
+ubidi_getParagraphByIndex
+ubidi_getProcessedLength
+ubidi_getReorderingMode
+ubidi_getReorderingOptions
+ubidi_getResultLength
+ubidi_getText
+ubidi_getVisualIndex
+ubidi_getVisualMap
+ubidi_getVisualRun
+ubidi_invertMap
+ubidi_isInverse
+ubidi_isOrderParagraphsLTR
+ubidi_open
+ubidi_openSized
+ubidi_orderParagraphsLTR
+ubidi_reorderLogical
+ubidi_reorderVisual
+ubidi_setClassCallback
+ubidi_setContext
+ubidi_setInverse
+ubidi_setLine
+ubidi_setPara
+ubidi_setReorderingMode
+ubidi_setReorderingOptions
+ubidi_writeReordered
+ubidi_writeReverse
+ubrk_close
+ubrk_countAvailable
+ubrk_current
+ubrk_first
+ubrk_following
+ubrk_getAvailable
+ubrk_getRuleStatus
+ubrk_getRuleStatusVec
+ubrk_isBoundary
+ubrk_last
+ubrk_next
+ubrk_open
+ubrk_preceding
+ubrk_previous
+ubrk_setText
+ubrk_setUText
+# Don't expose the following API because NDK has no mutable APIs for UText yet.
+#   ubrk_refreshUText
+# Don't expose the following APIs because android.icu.text.RuleBasedBreakIterator is not
+# public API yet.
+#   ubrk_getBinaryRules
+#   ubrk_getLocaleByType
+#   ubrk_openBinaryRules
+#   ubrk_openRules
+# The API below has a deprecated argument stackBuffer, and users has other API substitutes.
+#   ubrk_safeClone
+uenum_close
+uenum_count
+uenum_next
+uenum_openCharStringsEnumeration
+uenum_openUCharStringsEnumeration
+uenum_reset
+uenum_unext
+uldn_close
+uldn_getContext
+uldn_getDialectHandling
+uldn_getLocale
+uldn_keyDisplayName
+uldn_keyValueDisplayName
+uldn_languageDisplayName
+uldn_localeDisplayName
+uldn_open
+uldn_openForContext
+uldn_regionDisplayName
+uldn_scriptCodeDisplayName
+uldn_scriptDisplayName
+uldn_variantDisplayName
 ulocdata_getCLDRVersion
 uloc_acceptLanguage
 uloc_addLikelySubtags
@@ -162,3 +250,64 @@
 uloc_toLegacyType
 uloc_toUnicodeLocaleKey
 uloc_toUnicodeLocaleType
+unorm2_append
+unorm2_close
+unorm2_composePair
+unorm2_getCombiningClass
+unorm2_getDecomposition
+unorm2_getNFCInstance
+unorm2_getNFDInstance
+unorm2_getNFKCCasefoldInstance
+unorm2_getNFKCInstance
+unorm2_getNFKDInstance
+unorm2_getRawDecomposition
+unorm2_hasBoundaryAfter
+unorm2_hasBoundaryBefore
+unorm2_isInert
+unorm2_isNormalized
+unorm2_normalize
+unorm2_normalizeSecondAndAppend
+unorm2_quickCheck
+unorm2_spanQuickCheckYes
+# Do not support reading app-supplied .nrm data file.
+#   unorm2_getInstance
+# The java counterpart android.icu.text.FilteredNormalizer2 is not a public API yet.
+#   unorm2_openFiltered
+uscript_breaksBetweenLetters
+uscript_getCode
+uscript_getName
+uscript_getSampleString
+uscript_getScript
+uscript_getScriptExtensions
+uscript_getShortName
+uscript_getUsage
+uscript_hasScript
+uscript_isCased
+uscript_isRightToLeft
+utext_char32At
+utext_clone
+utext_close
+utext_current32
+utext_equals
+utext_extract
+utext_getNativeIndex
+utext_moveIndex32
+utext_nativeLength
+utext_next32
+utext_next32From
+utext_openUChars
+utext_openUTF8
+utext_previous32
+utext_previous32From
+utext_setNativeIndex
+# Do not expose the following APIs because mutability of UText is not strictly required by the users
+# , e.g. when being used in UBreakIterator.
+#   utext_copy
+#   utext_freeze
+#   utext_isWritable
+#   utext_replace
+#   utext_setup
+# No strong use case of the following APIs is found yet.
+#   utext_getPreviousNativeIndex
+#   utext_hasMetaData
+#   utext_isLengthExpensive