Commit Graph
8 Commits
Author SHA1 Message Date
Vladimir Rutsky 9f6e630246 ignore mdb-exportjson compiled binary 2015-02-20 20:23:17 +03:00
Vladimir Rutsky 3216c8de03 output all non-binary fields as unicode strings and binary fields as MongoDB extended JSON binary field
Now mdb-exportjson output can be successfully imported into MongoDB with
mongoimport even if:

 * columns have unicode names
 * there are fields of binary types (e.g. OLE)
2015-02-19 21:05:49 +03:00
Vladimir Rutsky f894cc708f add base64 encoding implementation from Wikibooks
Source <https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64>.

Licensed probably under CC-BY-SA. Compatibility with mdb-tools GPL
license should be checked.
2015-02-19 21:05:49 +03:00
Vladimir Rutsky bc1483429d use JSON unicode escape \uUUUU instead \xXX for [0, 0x20) characters
JSON specification doesn't allow `\xXX` escape sequences
2015-02-19 21:05:49 +03:00
Vladimir Rutsky 47c0698609 treat only characters with codes in [0, 0x20) range as non-ascii 2015-02-19 21:05:49 +03:00
Vladimir Rutsky d8cba08493 fix delimiter outputting when some fields values are missing 2015-02-19 20:51:57 +03:00
Vladimir Rutsky b842480cd5 don't drop non-ascii characters by default
This corresponds to `-A` option description.
2015-02-19 20:48:44 +03:00
Vladimir Rutsky 1758d99d4d Merge PR #52 - mdb-exportjson added 2015-02-19 20:46:33 +03:00