diff --git a/doc/contributions.txt b/doc/contributions.txt
index 9a2f9197fdfc24a20600331105768a6525ba00fe..5892a8081d8f7ec5d0074540edc572cacc971bcb 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -407,6 +407,7 @@ Michelle2 Zenovka
 	VWR-8310
 	VWR-9499
 Mm Alder
+	SNOW-376
 	VWR-197
 	VWR-3777
 	VWR-4232
@@ -646,6 +647,7 @@ Techwolf Lupindo
 	SNOW-649
 	SNOW-680
 	SNOW-681
+	SNOW-690
 	VWR-12385
 tenebrous pau
 	VWR-247
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 7d82ec3a71e612efaa1e0e6a1975863a9a95f33f..d251931ecabd1e482a1ba5ad39159be339fff949 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -126,7 +126,7 @@ BOOL LLChatBar::postBuild()
 	mInputEditor->setPassDelete(TRUE);
 	mInputEditor->setReplaceNewlinesWithSpaces(FALSE);
 
-	mInputEditor->setMaxTextLength(1023);
+	mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN);
 	mInputEditor->setEnableLineHistory(TRUE);
 
 	mIsBuilt = TRUE;
@@ -569,8 +569,12 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
 	S32 channel = 0;
 	LLWString out_text = stripChannelNumber(wtext, &channel);
 	std::string utf8_out_text = wstring_to_utf8str(out_text);
-	std::string utf8_text = wstring_to_utf8str(wtext);
+	if (!utf8_out_text.empty())
+	{
+		utf8_out_text = utf8str_truncate(utf8_out_text, MAX_MSG_STR_LEN);
+	}
 
+	std::string utf8_text = wstring_to_utf8str(wtext);
 	utf8_text = utf8str_trim(utf8_text);
 	if (!utf8_text.empty())
 	{
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 5f7d1a2ffa933704fa52fa6ff80df7f8acbbd457..b3b0c93b9954c8389034eaf483c0d2fefa7cb528 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -168,7 +168,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
 	LLUICtrlFactory::getInstance()->buildFloater(this, xml_filename, NULL);
 
 	setTitle(mSessionLabel);
-	mInputEditor->setMaxTextLength(1023);
+	mInputEditor->setMaxTextLength(DB_IM_MSG_STR_LEN);
 	// enable line history support for instant message bar
 	mInputEditor->setEnableLineHistory(TRUE);
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index cab6fbdc935323ac85b29dd9c350e90432c6e974..46d8f65d23d97220a94d1b8b90522dbc0696ec8f 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -176,7 +176,7 @@ const F32 TIME_BEFORE_MESH_CLEANUP = 5.f; // seconds
 const S32 AVATAR_RELEASE_THRESHOLD = 10; // number of avatar instances before releasing memory
 const F32 FOOT_GROUND_COLLISION_TOLERANCE = 0.25f;
 const F32 AVATAR_LOD_TWEAK_RANGE = 0.7f;
-const S32 MAX_BUBBLE_CHAT_LENGTH = 1023;
+const S32 MAX_BUBBLE_CHAT_LENGTH = DB_CHAT_MSG_STR_LEN;
 const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12;
 const F32 CHAT_FADE_TIME = 8.0;
 const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f;