Buffer search ignores the encoding passed as the second argument

Aperta
#3,892 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, node.js, typescript
Ambito
backend, compilers

Direzione di ricerca

Start by reading the Buffer method handling for includes and how its arguments are interpreted; the issue does not name a file or test. Compare the shown call with Node.js v22.23.2, where the second argument is treated as an encoding when it is a string. Done when the SharpTS interpretation returns true for the example.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Found while testing #3885. Node accepts a string in the byteOffset position as the encoding.

function find(b) { console.log(b.includes('42', 'hex')); }
find(Buffer.of(66));

Node.js v22.23.2 prints true. SharpTS interpretation prints false. The compiled generic property lookup is separately tracked by #3885.

Lingua principale
C#
Stelle
156
Fork
4
Merge medio
13h 20m
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nickna/SharpTS

Tutte le issue di nickna/SharpTS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.