From c603096fd272bfbef239ec1e8f6171323249dd18 Mon Sep 17 00:00:00 2001 From: astaple Date: Mon, 20 Aug 2012 13:48:53 -0700 Subject: [PATCH] SERVER-6801 Document lack of character encoding support in $substr. --- source/reference/aggregation.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index 117a1fc5739..e6d0edd677f 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -732,10 +732,16 @@ These operators manipulate strings within projection expressions. .. expression:: $substr :expression:`$substr` takes a string and two numbers. The first - number represents the number of characters in the string to skip, - and the second number specifies the number of characters to return + number represents the number of bytes in the string to skip, + and the second number specifies the number of bytes to return from the string. + .. note:: + + ::expression:`$substr` is not encoding aware and if used + improperly may produce a result string containing an invalid utf-8 + character sequence. + .. expression:: $toLower Takes a single string and converts that string to lowercase,