overleaf / spelling

The backend spellcheck API that performs spell checking for Overleaf
GNU Affero General Public License v3.0
9 stars 17 forks source link

fix aspell pipe encoding #36

Closed briangough closed 5 years ago

briangough commented 5 years ago

Description

I happened to look at the spelling logs and saw it was still erroring quite a log. The implementation has two problems related to stream chunk handling on the output from aspell. Two fixes:

  1. set the stdout encoding to utf8 instead of buffer, so that utf8 characters don't break across stream chunks
  2. extend the matcher to allow for aspell's 'end of data' marker being split across two chunks

I am cautiously hopeful this will fix the problems in https://github.com/overleaf/issues/issues/2007

Screenshots

NA

Related Issues / PRs

https://github.com/overleaf/issues/issues/2007

Review

Potential Impact

Spelling only, so low - can roll back if there is a problem.

Manual Testing Performed

Accessibility

NA

Deployment

NA

Deployment Checklist

Metrics and Monitoring

Spelling error logs in stackdriver

Who Needs to Know?

cc @mserranom