Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding #1

Closed
MassimoCappellano opened this issue Nov 22, 2018 · 2 comments
Closed

encoding #1

MassimoCappellano opened this issue Nov 22, 2018 · 2 comments

Comments

@MassimoCappellano
Copy link
Contributor

MassimoCappellano commented Nov 22, 2018

Esempio dai file anagrafica:
CODCF: 20388
RAGSOC: SERBEL I° SRL

Su mongo diventa db.DATA_BAC.find({documentType: 'REGISTRY', codiceCli: '20388'})

{ "_id" : ObjectId("5be33dc889415c0f7a0027fa"), "sequenceNumber" : 1872, "isDeleted" : false, "codiceCli" : "20388", "ragSoc" : "SERBEL I� SRL", "indSedeLeg" : "VIALE BIANCA MARIA 33", "codiceFisc" : "80076510157", "pIva" : "06875130152", "dataIns" : ISODate("2009-04-05T22:00:00Z"), "dataUMOD" : ISODate("2010-01-07T23:00:00Z"), "location" : { "localita" : "MILANO", "cap" : "20100", "prov" : "MI" }, "hash" : "f460905ff47086dad1f5339ceade744b9680d541", "documentType" : "REGISTRY" }

indegare come viene gestito encoding dalla libreria node-dbf

abstractvector/node-dbf#34

@MassimoCappellano
Copy link
Contributor Author

Il file dBASE sembra codificato in ASCII

Per i caratteri estesi di ASCII dopo 127 vedi https://www.petefreitag.com/cheatsheets/ascii-codes/

Informazioni generali: https://www.whoishostingthis.com/resources/ascii/

MassimoCappellano added a commit to onlyconnect-tech/node-dbf that referenced this issue Nov 23, 2018
MassimoCappellano added a commit that referenced this issue Nov 23, 2018
@MassimoCappellano
Copy link
Contributor Author

MassimoCappellano commented Nov 23, 2018

Very simple patch using a modified version of node-dbf: read from .dbf files like 'latin1'. Now reading inserted json into mongodb is:

> db.DATA_BAC.find({documentType: 'REGISTRY', codiceCli: '20388'})
{ "_id" : ObjectId("5bf800a1150afe16004c6ae9"), "sequenceNumber" : 1872, "isDeleted" : false, "codiceCli" : "20388", "ragSoc" : "SERBEL I° SRL", "indSedeLeg" : "VIALE BIANCA MARIA 33", "codiceFisc" : "80076510157", "pIva" : "06875130152", "dataIns" : ISODate("2009-04-05T22:00:00Z"), "dataUMOD" : ISODate("2010-01-07T23:00:00Z"), "location" : { "localita" : "MILANO", "cap" : "20100", "prov" : "MI" }, "hash" : "8d63130d21d34cfab9a15bdbed229d65a38c1adb", "documentType" : "REGISTRY" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant