Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(iconv): implement iconv and encodings : ASCII, (unicode defined encodings)utf8, utf16, utf32 #326

Merged
merged 12 commits into from
Oct 14, 2024

Conversation

rishadbaniya
Copy link
Contributor

@rishadbaniya rishadbaniya commented Oct 13, 2024

Instead of following a dynamic library loading method(which GNU does) we have gone for static library(since we have small set of encodings right now), this adds on less complexity for dev purpose as well,

FYI: we can always move to a dynamic library approach in the future if we need...as the encoding follows the following flow

FROM ENCODING -> UCS-4 FORMAT(Intermediate format in our case) -> TO ENCODING

@rishadbaniya rishadbaniya marked this pull request as draft October 13, 2024 19:44
@rishadbaniya rishadbaniya marked this pull request as ready for review October 13, 2024 20:23
@rishadbaniya rishadbaniya changed the title feat(iconv: implement iconv feat(iconv): implement iconv and encodings : ASCII, (unicode defined encodings)utf8, utf16, utf32 Oct 13, 2024
Copy link
Contributor

@jgarzik jgarzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main comment is about a non-streaming implementation. Is streaming easy or difficult?

For the user, reading everything into memory is a challenge for very large files.

i18n/Cargo.toml Outdated Show resolved Hide resolved
i18n/iconv.rs Outdated Show resolved Hide resolved
@rishadbaniya
Copy link
Contributor Author

rishadbaniya commented Oct 14, 2024

i've replaced with chain of iterator consumption(with a circular buffer of max size 10000 bytes)..hence large files will work with very low memory footprint

i.e streaming has been enabled

@jgarzik jgarzik merged commit 30c1903 into rustcoreutils:main Oct 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants