Skip to content

Commit

Permalink
upgrade the version of unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Feb 18, 2024
1 parent 8ab2c34 commit 7015958
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "unicode-blocks"
version = "0.1.8"
version = "0.1.9"
authors = ["Magic Len <[email protected]>"]
edition = "2021"
rust-version = "1.56"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Unicode Blocks

This crate contains a list of all unicode blocks and provides some functions to search across them.

The latest version of Unicode: 15.0.0
The latest version of Unicode: 15.1.0

## Examples

Expand Down
3 changes: 2 additions & 1 deletion src/cjk.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{unicode_block::UnicodeBlock, unicode_blocks::*};

const CJK_BLOCKS: [UnicodeBlock; 32] = [
const CJK_BLOCKS: [UnicodeBlock; 33] = [
CJK_UNIFIED_IDEOGRAPHS,
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
Expand All @@ -10,6 +10,7 @@ const CJK_BLOCKS: [UnicodeBlock; 32] = [
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F,
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G,
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H,
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I,
CJK_COMPATIBILITY,
CJK_COMPATIBILITY_FORMS,
CJK_COMPATIBILITY_IDEOGRAPHS,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This crate contains a list of all unicode blocks and provides some functions to search across them.
The latest version of Unicode: 15.0.0
The latest version of Unicode: 15.1.0
## Examples
Expand Down
8 changes: 6 additions & 2 deletions src/unicode_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

use crate::UnicodeBlock;

pub const VERSION: &str = "15.0.0";

pub const VERSION: &str = "15.1.0";
pub const BASIC_LATIN: UnicodeBlock = UnicodeBlock {
name: "Basic Latin", start: 0, end: 127
};
Expand Down Expand Up @@ -1173,6 +1172,10 @@ pub const CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F: UnicodeBlock =
UnicodeBlock {
name: "CJK Unified Ideographs Extension F", start: 183984, end: 191471
};
pub const CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I: UnicodeBlock =
UnicodeBlock {
name: "CJK Unified Ideographs Extension I", start: 191472, end: 192095
};
pub const CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT: UnicodeBlock =
UnicodeBlock {
name: "CJK Compatibility Ideographs Supplement", start: 194560, end: 195103
Expand Down Expand Up @@ -1521,6 +1524,7 @@ pub fn find_unicode_block(c: char) -> Option<UnicodeBlock> {
'\u{02B740}'..='\u{02B81F}' => Some(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D),
'\u{02B820}'..='\u{02CEAF}' => Some(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E),
'\u{02CEB0}'..='\u{02EBEF}' => Some(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F),
'\u{02EBF0}'..='\u{02EE5F}' => Some(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I),
'\u{02F800}'..='\u{02FA1F}' => Some(CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT),
'\u{030000}'..='\u{03134F}' => Some(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G),
'\u{031350}'..='\u{0323AF}' => Some(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H),
Expand Down

0 comments on commit 7015958

Please sign in to comment.