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

Support std::char::UNICODE_VERSION #9

Closed
KamilaBorowska opened this issue Jul 22, 2020 · 3 comments
Closed

Support std::char::UNICODE_VERSION #9

KamilaBorowska opened this issue Jul 22, 2020 · 3 comments

Comments

@KamilaBorowska
Copy link

KamilaBorowska commented Jul 22, 2020

Values of that constant depend on Rust version:

Rust 1.44: (13, 0, 0)
Rust 1.38 to 1.43: (12, 1, 0)
Rust 1.28 to 1.37: (11, 0, 0)

@jhpratt
Copy link
Owner

jhpratt commented Jul 22, 2020

Can you please provide a source? This seems like a trivial addition that I could make this weekend.

@KamilaBorowska
Copy link
Author

KamilaBorowska commented Jul 22, 2020

For Rust 1.44, upgrade to Unicode 13.0 was mentioned in changelog: https://github.com/rust-lang/rust/blob/master/RELEASES.md.

For determination whether Unicode version is at least 12, the following program can be executed. U+10FE0 character was added in Unicode 12.0. rust-lang/rust#62641 did update Unicode version from 11.0 to 12.1 (see diff for src/libcore/unicode/tables.rs), so there is no need to concern about 12.0, no version of Rust had 12.0, the update was to 12.1.

fn main() {
    println!("{}", '\u{10FE0}'.is_alphabetic());
}

For determination whether Unicode version is at least 11, the following program can be executed. U+1C90 character was added in Unicode 11.0. The minimum Rust version supported by standback is 1.31, and the Unicode update occured in 1.28, so there is no need to look deeper.

fn main() {
    println!("{}", '\u{1C90}'.is_alphabetic());
}

For list of Unicode versions, https://unicode.org/history/publicationdates.html can be checked. 11.0.0, 12.0.0, 12.1.0 and 13.0.0 were the only Unicode versions that needed to be tested.

@jhpratt
Copy link
Owner

jhpratt commented Aug 15, 2020

Status update: I'm quite busy, and intend on doing a joint release for 1.45 and 1.46 support. This would include both this issue and the open PR.

@jhpratt jhpratt closed this as completed Aug 23, 2020
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

No branches or pull requests

2 participants