Commit 428b2fc
committed
fix(wc): keep WASI default locale UTF-8 compatible
WASI does not provide an ambient locale, so treating a missing LC_CTYPE/LANG as C/POSIX makes wc -m count bytes by default. Preserve the existing UTF-8 behavior for WASI while keeping POSIX fallback on platforms with native locale environments.1 parent 5402711 commit 428b2fc
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
0 commit comments