by Anonymous » 23 Feb 2025, 15:51
In meinem Projekt enthält dort das SOH -Symbol, das aus binären Inhalten analysiert wurde. Ich habe so versucht, das Symbol zu ersetzen, aber nicht funktioniert: < /p>
Code: Select all
const message = 'a[special soh symbol]b'
message.replaceAll('[special soh symbol]',"soh symbol")
message.replaceAll('\x01', 'soh symbol')
message.replaceAll('\u0001', 'soh symbol')
console.log(message)
Was ich erwarte, ist Ausgabe: ASOH SymbolB . Vermisse ich etwas? Was soll ich tun, um das spezielle Symbol in JavaScript zu ersetzen? />
In meinem Projekt enthält dort das SOH -Symbol, das aus binären Inhalten analysiert wurde. Ich habe so versucht, das Symbol zu ersetzen, aber nicht funktioniert: < /p>
[code]const message = 'a[special soh symbol]b'
message.replaceAll('[special soh symbol]',"soh symbol")
message.replaceAll('\x01', 'soh symbol')
message.replaceAll('\u0001', 'soh symbol')
console.log(message)
[/code]
Was ich erwarte, ist Ausgabe: ASOH SymbolB . Vermisse ich etwas? Was soll ich tun, um das spezielle Symbol in JavaScript zu ersetzen? />