summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/CMakeLists.txt2
-rw-r--r--indra/llcommon/llstring.cpp41
-rw-r--r--indra/llcommon/llstring.h3
3 files changed, 11 insertions, 35 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index c947184dc8..5f4ed2fffa 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -3,7 +3,6 @@
project(llcommon)
include(00-Common)
-include(ICU4C)
include(LLCommon)
include(bugsplat)
include(Linking)
@@ -283,7 +282,6 @@ target_link_libraries(
ll::uriparser
ll::oslibraries
ll::tracy
- ll::icu4c
)
target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 4aa54bb12d..28c2ec5b39 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -30,7 +30,6 @@
#include "llerror.h"
#include "llfasttimer.h"
#include "llsd.h"
-#include <unicode/uchar.h>
#include <vector>
#if LL_WINDOWS
@@ -1008,40 +1007,18 @@ std::string LLStringOps::sAM;
std::string LLStringOps::sPM;
// static
-bool LLStringOps::isEmoji(llwchar wch)
-{
- int ublock = ublock_getCode(wch);
- switch (ublock)
- {
- case UBLOCK_GENERAL_PUNCTUATION:
- case UBLOCK_LETTERLIKE_SYMBOLS:
- case UBLOCK_ARROWS:
- case UBLOCK_MISCELLANEOUS_TECHNICAL:
- case UBLOCK_ENCLOSED_ALPHANUMERICS:
- case UBLOCK_GEOMETRIC_SHAPES:
- case UBLOCK_MISCELLANEOUS_SYMBOLS:
- case UBLOCK_DINGBATS:
- case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION:
- case UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS:
- case UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS:
- case UBLOCK_EMOTICONS:
- case UBLOCK_TRANSPORT_AND_MAP_SYMBOLS:
-#if U_ICU_VERSION_MAJOR_NUM > 56
- // Boost uses ICU so we can't update it independently
- case UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS:
-#endif // U_ICU_VERSION_MAJOR_NUM > 56
- return true;
- default:
-#if U_ICU_VERSION_MAJOR_NUM > 56
- return false;
+bool LLStringOps::isEmoji(llwchar a)
+{
+#if 0 // Do not consider special characters that might have a corresponding
+ // glyph in the monochorme fallback fonts as a "genuine" emoji. HB
+ return a == 0xa9 || a == 0xae || (a >= 0x2000 && a < 0x3300) ||
+ (a >= 0x1f000 && a < 0x20000);
#else
- // See https://en.wikipedia.org/wiki/Supplemental_Symbols_and_Pictographs
- return wch >= 0x1F900 && wch <= 0x1F9FF;
-#endif // U_ICU_VERSION_MAJOR_NUM > 56
- }
+ // These are indeed "genuine" emojis, we *do want* rendered as such. HB
+ return a >= 0x1f000 && a < 0x20000;
+#endif
}
-
S32 LLStringOps::collate(const llwchar* a, const llwchar* b)
{
#if LL_WINDOWS
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index a40359115e..a8d910298c 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -189,7 +189,8 @@ public:
static bool isAlnum(char a) { return isalnum((unsigned char)a) != 0; }
static bool isAlnum(llwchar a) { return iswalnum(a) != 0; }
- static bool isEmoji(llwchar wch);
+ // Returns true when 'a' corresponds to a "genuine" emoji. HB
+ static bool isEmoji(llwchar a);
static S32 collate(const char* a, const char* b) { return strcoll(a, b); }
static S32 collate(const llwchar* a, const llwchar* b);