Permalink
Browse files

Mention utf-8 encoding messup

  • Loading branch information...
1 parent ca75936 commit da1e187c90a1e61fa8b492c2acaf5b0fefac4c16 @majek majek committed Oct 25, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 README.md
View
@@ -190,11 +190,13 @@ has following methods and properties:
<dd>Last known IP address of the client.</dd>
<dt>write(message)</dt>
-
<dd>Sends a message over opened connection. A message must be a
- non-empty string that can be encoded using UTF-8. It's illegal to
- send a message after the connection was closed (either after 'close'
- or 'end' method or 'close' event).</dd>
+ non-empty string that can be encoded using UTF-8. The message must
+ be composed of valid unicode characters. Beware of
+ [unicode surrogates](http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates)
+ as they are known to break some transports (including
+ websockets). It's illegal to send a message after the connection was
+ closed (either after 'close' or 'end' method or 'close' event).</dd>
<dt>close([code], [reason])</dt>
<dd>Asks the remote client to disconnect. 'code' and 'reason'

0 comments on commit da1e187

Please sign in to comment.