ondata / appaltipop

ETL scripts and issue tracking for AppaltiPOP project.

Home Page:https://www.appaltipop.it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problemi di encoding nei JSON

aborruso opened this issue · comments

Caro Vinc,
faccio un esempio sur Milano (01199250158).

Il mio input XML, contiene tra i partecipanti

    <partecipanti>
      <partecipante>
        <codiceFiscale>09864610150</codiceFiscale>
        <ragioneSociale>CLASS PUBBLICITA' S.R.L. - VIA BURIGOZZO 5 - 20122 MILANO</ragioneSociale>
      </partecipante>
    </partecipanti>

che nel CSV (encoding UTF-8) è

12,ZF9258AC42,09864610150,SOCIETA’ CLASS PUBBLICITA’ SPA,,,,idm244

Nel JSON OCDS di output i maledetti apici di tutti i tipi diventano

                    "suppliers": [
                        {
                            "name": "CLASS PUBBLICITA�  SPA",
                            "id": "S-IT-CF-09864610150"
                        }
                    ]

Non so dove si rompe la cosa. Magari devi soltanto fissare l'encoding all'import del CSV su pandas.

Grazie

Trovato e fixato. Grazie. Rigenero i file al mio rientro