You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Convert character encodings using [iconv-lite](https://github.com/ashtuchkin/iconv-lite). Supports streams.
5
+
Convert character encodings in gulp v4 using [iconv-lite](https://github.com/ashtuchkin/iconv-lite). Supports streams.
6
+
7
+
> [!NOTE]
8
+
> As of gulp v5, this plugin is redundant: gulp v5 includes native support for transcoding text files using iconv-lite.
9
+
>
10
+
> You can migrate away from this plugin by passing `from` and `to` as `options.encoding` to `src` and `dest` respectively. The default encoding is `utf8`.
6
11
7
12
## Install
8
13
@@ -19,15 +24,15 @@ import convertEncoding from 'gulp-convert-encoding';
19
24
exportdefault () =>
20
25
gulp
21
26
.src('src/file.txt')
22
-
.pipe(convertEncoding({ from:'iso-8859-1' }))
27
+
.pipe(convertEncoding({ from:'latin1' }))
23
28
.pipe(gulp.dest('dist'));
24
29
```
25
30
26
31
## API
27
32
28
33
### convertEncoding(options)
29
34
30
-
> [!IMPORTANT]
35
+
> [!IMPORTANT]
31
36
> You must provide one or both of the `from` and `to` options.
32
37
> [Supported encodings](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings) are listed on the iconv-lite wiki.
0 commit comments