11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_cirequire('../common'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst { Readable } = require('stream'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci{ 91cb0ef41Sopenharmony_ci const readable = new Readable({ encoding: 'hex' }); 101cb0ef41Sopenharmony_ci assert.strictEqual(readable._readableState.encoding, 'hex'); 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ci readable.setEncoding(null); 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ci assert.strictEqual(readable._readableState.encoding, 'utf8'); 151cb0ef41Sopenharmony_ci} 16