We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ece505 commit 5f800c9Copy full SHA for 5f800c9
1 file changed
src/nbb/impl/bencode.cljs
@@ -59,7 +59,7 @@
59
(defn read-bencode [string] (first (decode string)))
60
61
(defn utf8-bytes [s]
62
- (.-length (js/Buffer.from s)))
+ (.-length (.encode (new js/TextEncoder) s)))
63
64
(defn encode [data]
65
(cond
0 commit comments