overleaf/services/document-updater
James Allen a3847d21d5 Replace UTF-16 surrogate characters with 'replacement character'
In Javascript, characters are 16-bits wide. It does not understand surrogates as characters.

From Wikipedia (http://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane):
"The High Surrogates (U+D800–U+DBFF) and Low Surrogate (U+DC00–U+DFFF) codes are reserved
for encoding non-BMP characters in UTF-16 by using a pair of 16-bit codes: one High Surrogate
and one Low Surrogate. A single surrogate code point will never be assigned a character.""

The main offender seems to be \uD835 as a stand alone character, which would be the first
16-bit character of a blackboard bold character (http://www.fileformat.info/info/unicode/char/1d400/index.htm).
Something must be going on client side that is screwing up the encoding and splitting the
two 16-bit characters so that \uD835 is standalone.
2015-06-12 10:14:35 +01:00
..
app Replace UTF-16 surrogate characters with 'replacement character' 2015-06-12 10:14:35 +01:00
config Move to default settings file 2014-05-15 16:22:06 +01:00
test Replace UTF-16 surrogate characters with 'replacement character' 2015-06-12 10:14:35 +01:00
.gitignore Set up acceptance tests in TravisCI 2014-02-26 16:54:35 +00:00
.travis.yml Remove acceptance test from travis 2014-08-15 11:06:31 +01:00
app.coffee added redis health check 2014-11-20 11:40:52 +00:00
Gruntfile.coffee Use version from web, with fallback to old mongo collection 2014-05-14 13:28:17 +01:00
LICENSE Create LICENSE 2014-02-18 17:23:36 +00:00
package.json Release version 0.1.4 2015-03-20 14:21:34 +00:00
README.md Update README.md 2014-02-24 14:43:33 +00:00

document-updater-sharelatex

An API for applying incoming updates to documents in real-time.

Build Status

License

The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the LICENSE file.

Copyright (c) ShareLaTeX, 2014.