Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

216
Vistas
Text file extracted from Zip file contains latin characters

I have a simple Node app with a function that downloads a WordPress theme zip file and console logs the contents of the theme.json file.

const StreamZip = require('node-stream-zip');
var AdmZip = require("adm-zip");
const axios = require('axios');

const f = async () => {
    const url = 'https://downloads.wordpress.org/theme/twentytwentytwo.1.2.zip';
    const body = await axios.get(url, {
        responseType: 'arraybuffer',
    });
    var zip = new AdmZip(body.data);
    var zipEntries = zip.getEntries(); // an array of ZipEntry records

    zipEntries.forEach(function (zipEntry) {
        if (zipEntry.entryName == "twentytwentytwo/theme.json") {
            const tp = zipEntry.getData();
            const tmp = Buffer.from(tp, 'base64').toString('utf8')
            console.log(tmp);
        }
    });
};
f();

However, as can be seen in the output below there are some unexpected characters included. I'm not sure what these are, or how to remove them from the output.

ä
        "version": 2,
        "customTemplates": Ä
                ä
                        "name": "blank",
                        "title": "Blank",
                        "postTypes": Ä
                           "page",
                           "post"
                        Ü
                ü,
                ä
                        "name": "page-large-header",
                        "title": "Page (Large Header)",
                        "postTypes": Ä
                           "page"
                        Ü
                ü,
                ä
                        "name": "single-no-separators",
                        "title": "Single Post (No Separators)",
                        "postTypes": Ä
                           "post"
                        Ü
                ü,
                ä
                        "name": "page-no-separators",
                        "title": "Page (No Separators)",
                        "postTypes": Ä
                           "page"
                        Ü
                ü
        Ü,
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda