version 0.5.1, no exception but break the string line when dump some special data
- Dominant language
- C++
- Stars
- 25
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
when I use this lib to dumps some data, it make a puzzled question, [sample.log](https://github.com/hhatto/pyrapidjson/files/1634053/sample.log) is the minimized data to show it. my python version is 2.7.13 .
1. pyrapidjson 0.5 + not encode with utf-8
```
# -*- coding:utf-8 -*-
import codecs
import rapidjson
if __name__ == '__main__':
with codecs.open('sample.log', 'rb', 'utf-8') as f_read:
report_data = [f_read.read(),]
print report_data
report_json = rapidjson.dumps(report_data)
print report_json
```
it raise a crash about python like:

2. pyrapidjson 0.5 + encode with utf-8
```
# -*- coding:utf-8 -*-
import codecs
import rapidjson
if __name__ == '__main__':
with codecs.open('sample.log', 'rb', 'utf-8') as f_read:
report_data = [f_read.read().encode('utf-8'),]
print report_data
report_json = rapidjson.dumps(report_data)
print report_json
```
it may right like:

3. pyrapidjson 0.5.1 + not encode with utf-8
```
# -*- coding:utf-8 -*-
import codecs
import rapidjson
if __name__ == '__main__':
with codecs.open('sample.log', 'rb', 'utf-8') as f_read:
report_data = [f_read.read(),]
print report_data
report_json = rapidjson.dumps(report_data)
print report_json
```
it like the following picture, no exception but break the string line:

4. pyrapidjson 0.5.1 + encode with utf-8
```
# -*- coding:utf-8 -*-
import codecs
import rapidjson
if __name__ == '__main__':
with codecs.open('sample.log', 'rb', 'utf-8') as f_read:
report_data = [f_read.read().encode('utf-8'),]
print report_data
report_json = rapidjson.dumps(report_data)
print report_json
```
it like the following picture, also no exception but break the string line:

with this condition, I can't know right or not about dumps result. I think it may raise an exception when meet this condition or another way to let user know about this error.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.