summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epan/charsets.c2
-rw-r--r--wsutil/unicode-utils.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/epan/charsets.c b/epan/charsets.c
index 336f7fc6b9..7f298fdba2 100644
--- a/epan/charsets.c
+++ b/epan/charsets.c
@@ -548,6 +548,8 @@ get_ucs_2_string(wmem_allocator_t *scope, const guint8 *ptr, gint length, const
* referred to by the pointer and length as a UTF-16 encoded string, and
* return a pointer to a UTF-8 string, allocated with the wmem scope.
*
+ * See RFC 2781 section 2.2.
+ *
* Encoding parameter should be ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN.
*
* Specify length in bytes.
diff --git a/wsutil/unicode-utils.h b/wsutil/unicode-utils.h
index 902a4fb4b5..30ec43a919 100644
--- a/wsutil/unicode-utils.h
+++ b/wsutil/unicode-utils.h
@@ -101,7 +101,7 @@ void arg_list_utf_16to8(int argc, char *argv[]);
#define IS_TRAIL_SURROGATE(uchar2) \
((uchar2) >= 0xdc00 && (uchar2) < 0xe000)
#define SURROGATE_VALUE(lead, trail) \
- (((((lead) - 0xd800) << 10) | ((trail) - 0xdc00)) + 0x100000)
+ (((((lead) - 0xd800) << 10) | ((trail) - 0xdc00)) + 0x10000)
#ifdef __cplusplus
}