Replace the Rust URL form-encoding callback bridge into C++ TextCodec with a direct encoding_rs encoder. This keeps percent-encode-after-encoding entirely in Rust and removes liburl_rust's dependency on LibTextCodec. It also happens to fix ISO-2022-JP URL encoding of literal U+FFFD. The LibTextCodec reverse lookup treats generated 0xFFFD table holes as real JIS0208 mappings, so literal U+FFFD skipped the encoder-error path. encoding_rs treats U+FFFD as unmappable, so URL encoding emits the required numeric character reference.
20 lines
350 B
TOML
20 lines
350 B
TOML
[package]
|
|
name = "liburl_rust"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[lib]
|
|
crate-type = ["staticlib"]
|
|
|
|
[dependencies]
|
|
encoding_rs = "0.8.35"
|
|
libregex_rust = { path = "../../LibRegex/Rust" }
|
|
libunicode_rust = { path = "../../LibUnicode/Rust" }
|
|
|
|
[features]
|
|
default = []
|
|
allocator = []
|
|
debug-validation-errors = []
|
|
|
|
[build-dependencies]
|
|
cbindgen = "0.29"
|