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

Add missing unicode module #735

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Aug 6, 2023

Implement unicode:characters_to_list/1,2 and unicode:characters_to_binary/1,2,3 using new interop_iolist_fold.

This fixes io_lib:format/2 with t modifier.

Rename interop_iolist_fold to interop_chardata_fold because it really processes iodata and now chardata as it works for unicode.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot force-pushed the w31/add-missing-unicode-module branch from 2bfcc40 to 628607a Compare August 6, 2023 18:54
src/libAtomVM/nifs.c Outdated Show resolved Hide resolved
@pguyot pguyot force-pushed the w31/add-missing-unicode-module branch from 628607a to 729a11a Compare August 6, 2023 21:06
Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

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

Just one last request: can you add information relevant to end users about this change to the CHANGELOG file?

@pguyot pguyot closed this Aug 9, 2023
@pguyot pguyot force-pushed the w31/add-missing-unicode-module branch from 729a11a to 052dbda Compare August 9, 2023 20:34
@bettio bettio reopened this Aug 10, 2023
@pguyot pguyot force-pushed the w31/add-missing-unicode-module branch from 257870b to c26fe9c Compare August 10, 2023 13:23
@pguyot pguyot requested a review from bettio August 10, 2023 14:45
src/libAtomVM/nifs.c Show resolved Hide resolved
src/libAtomVM/nifs.c Show resolved Hide resolved
src/libAtomVM/nifs.c Show resolved Hide resolved
Implement `unicode:characters_to_list/1,2` and `unicode:characters_to_binary/1,2,3` using new `interop_iolist_fold`.

This fixes `io_lib:format/2` with `t` modifier.

Rename `interop_iolist_fold` to `interop_chardata_fold` because it really processes `iodata` and now `chardata` as it works for unicode.

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot force-pushed the w31/add-missing-unicode-module branch from c26fe9c to ca8d8de Compare August 11, 2023 06:44
@bettio bettio merged commit eb2a5a1 into atomvm:master Aug 11, 2023
80 checks passed
@pguyot pguyot deleted the w31/add-missing-unicode-module branch August 11, 2023 08:41
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