[limit] use correct encoding for checking length

ideally, we should pass the encoding to `Buffer.byteLength`, but I don't know to retrieve it.