Skip to content

Commit

Permalink
Fix unicode string enum
Browse files Browse the repository at this point in the history
  • Loading branch information
ghsang committed May 10, 2024
1 parent e77cc5f commit 447cf49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sea-orm-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ proc-macro = true
bae = { version = "0.2", package = "sea-bae", default-features = false, optional = true }
syn = { version = "2", default-features = false, features = ["parsing", "proc-macro", "derive", "printing"] }
quote = { version = "1", default-features = false }
heck = { version = "0.4", default-features = false }
heck = { version = "0.5", default-features = false }
proc-macro2 = { version = "1", default-features = false }
unicode-ident = { version = "1" }

Expand Down
6 changes: 6 additions & 0 deletions sea-orm-macros/src/derives/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,11 @@ mod tests {
camel_case_with_escaped_non_uax31("1 2 3"),
"_0x310x2020x203"
);

assert_eq!(camel_case_with_escaped_non_uax31("씨오알엠"), "씨오알엠");

assert_eq!(camel_case_with_escaped_non_uax31("A_B"), "A0x5Fb");

assert_eq!(camel_case_with_escaped_non_uax31("AB"), "Ab");
}
}

0 comments on commit 447cf49

Please sign in to comment.