Skip to content

yes: support invalid unicode on Windows #12236

@oech3

Description

@oech3

One of a common usecase of yes is generating periodic binary data which is blocked by

// But, on Windows, we must hop through a String.
#[cfg(not(any(unix, target_os = "wasi")))]
{
for part in itertools::intersperse(i.map(|a| a.to_str()), Some(" ")) {
let bytes = part
.ok_or_else(|| USimpleError::new(1, translate!("yes-error-invalid-utf8")))?
.as_bytes();
buf.extend_from_slice(bytes);
}
}

currently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions