diff --git a/src/Ratchet/WebSocket/Version/RFC6455.php b/src/Ratchet/WebSocket/Version/RFC6455.php
index <HASH>..<HASH> 100644
--- a/src/Ratchet/WebSocket/Version/RFC6455.php
+++ b/src/Ratchet/WebSocket/Version/RFC6455.php
@@ -146,6 +146,10 @@ class RFC6455 implements VersionInterface {
             $parsed = $from->WebSocket->message->getPayload();
             unset($from->WebSocket->message);
 
+            if (!mb_check_encoding($parsed, 'UTF-8')) {
+                return $from->close(Frame::CLOSE_BAD_PAYLOAD);
+            }
+
             $from->WebSocket->coalescedCallback->onMessage($from, $parsed);
         }
[WebSocket] RFC compliance

Close connection if payload is not UTF-8
Fixed several AB 6.* tests
Refs #<I>