Skip to content

Commit 20ad8e4

Browse files
Add output encoding options and bump version to 0.5.0 (#23)
## Summary - add a global `--output-encoding` option with `utf8-no-bom`, `utf8-bom`, and `utf8` values - plumb output encoding through CLI query execution into file writes while keeping the default behavior as UTF-8 without BOM - bump cirup and packaging metadata to 0.5.0 and document the new option ## Details - add `CliOutputEncoding` parsing and tests in `cirup_cli` - add `OutputEncoding` support and BOM-aware byte generation in `cirup_core::file` - expose the core output encoding type and route interactive writes through the new encoding-aware save path - sync 0.5.0 across the Rust crates, NuGet packaging projects, sample project, and e2e script ## Validation - `cargo fmt --all --check` - `cargo clippy --workspace --all-targets` - `cargo test --workspace` - manual smoke test of `file-convert` output bytes for RESX, JSON, and RESTEXT with `utf8-no-bom` vs `utf8-bom` ## Notes - `cargo clippy` completed successfully but emitted an environment-level warning while finalizing an incremental compilation directory under `target`
1 parent a51432d commit 20ad8e4

16 files changed

Lines changed: 237 additions & 114 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ bin/
44
.vscode/
55
.idea/
66
target/
7+
cirup.sln

Cargo.lock

Lines changed: 58 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
# cirup-rs
1+
# cirup
22

33
`cirup` is a command-line tool for working with localization resource files.
44
It supports `.json`, `.resx`, and `.restext` files.
55

66
## Quick start
77

8+
Install `cirup` globally as a .NET tool:
9+
10+
```bash
11+
dotnet tool install -g Devolutions.Cirup.Tool
12+
```
13+
814
Build the workspace:
915

1016
```bash
@@ -28,6 +34,7 @@ cirup --help
2834
- `-v`, `-vv`, ...: increase log verbosity.
2935
- `-C`, `--show-changes`: for `file-diff`, include keys that exist in both files but have different values.
3036
- `--touch`: force writing output files even when generated bytes are identical.
37+
- `--output-encoding <utf8-no-bom|utf8-bom|utf8>`: control output file encoding. `utf8` behaves like `utf8-no-bom`.
3138

3239
By default, cirup avoids rewriting output files when content has not changed.
3340

cirup_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cirup_cli"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
authors = ["Marc-André Moreau <marcandre.moreau@gmail.com>"]
55
edition = "2024"
66

0 commit comments

Comments
 (0)