`hh_parse --full-fidelity-json` generates strictly invalid JSON for non-UTF8 sequences
Open
hack
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
### HHVM Version
HHVM 3.27.0
### Operating System and Version
MacOS High Sierra
### Standalone code, or other way to reproduce the problem
```
$ hh_parse --full-fidelity-json hphp/test/quick/Empty.php | hhvm --php -r 'var_dump(json_decode(trim(stream_get_contents(\STDIN))) === NULL);'
$ hh_parse --full-fidelity-json hphp/test/zend/good/ext/iconv/tests/eucjp2sjis.php | hhvm --php -r 'var_dump(json_decode(trim(stream_get_contents(\STDIN))) === NULL);'
```
### Actual result
```
bool(false)
bool(true)
```
### Expected result
```
bool(false)
bool(false)
```
Contributor guide
Assessment
This issue has not been assessed yet.