1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] JavaScript TextEncoder / TextDecoder equivalent in python

Discussão em 'Python' iniciado por Stack, Maio 13, 2025.

  1. Stack

    Stack Membro Participativo

    I wanted to get the same results we got by using TextEncoder and TextDecoder on javascript but couldn't find real code solution the soluction I found doesn't give me the real same results.

    exp:

    const textencoder = new TextEncoder();
    console.log(textencoder.encode('$'));
    //[36]

    const textdecoder = TextDecoder();
    console.log(textdecoder.decode(new Uint8Array([36]));
    // $

    Continue reading...

Compartilhe esta Página