Skip to content

Normalize Hangul #2467

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

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Normalize Hangul #2467

merged 1 commit into from
Aug 2, 2023

Conversation

tamaroning
Copy link
Contributor

@tamaroning tamaroning commented Jul 24, 2023

Addresses #2379
depends on PR #2425

gccrs: Normalize Hangul to NFC
gcc/rust/ChangeLog:

	* util/rust-unicode.cc (decomp_cano): Decompose Hangul.
	(sort_cano): Fix bounds check.
	(recomp): use `compose_hangul`.
	(compose_hangul): Compose Hangul.
	(rust_utf8_normalize_test): Add tests.

Signed-off-by: Raiki Tamura <[email protected]>

More tests will be added in another PR.

See: Sample Code for Hangul Algorithms
https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf

@tamaroning tamaroning force-pushed the uc-hangul branch 2 times, most recently from 50f12e7 to 35ad3c5 Compare July 26, 2023 16:53
@tamaroning tamaroning marked this pull request as ready for review July 26, 2023 17:00
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +231 to +232
// int starter_pos = 0; // Assume the first character is Starter. Correct?
// int target_pos = 1;
Copy link
Member

Choose a reason for hiding this comment

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

dead code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in #2463

@CohenArthur
Copy link
Member

@tamaroning once the conflicts are fixed, I'll merge this PR :)

gcc/rust/ChangeLog:

	* util/rust-unicode.cc (decomp_cano): Decompose Hangul.
	(sort_cano): Fix bounds check.
	(recomp): use `compose_hangul`.
	(compose_hangul): Compose Hangul.
	(rust_utf8_normalize_test): Add tests.

Signed-off-by: Raiki Tamura <[email protected]>
@tamaroning
Copy link
Contributor Author

@CohenArthur It's ready to merge :)

@CohenArthur CohenArthur added this pull request to the merge queue Aug 2, 2023
Merged via the queue into Rust-GCC:master with commit f78dd97 Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants