File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1+ # git2rdata 0.3.1
2+
3+ * Use ` icuSetCollate() ` to define a standardised sorting.
4+
15# git2rdata 0.3.0
26
37## New features
3236
3337* Calculation of data hash has changed (#53 ).
3438 You must use ` upgrade_data() ` to read data stored by an older version.
35- * ` is_git2rdata() ` and ` upgrade_data() ` do not test equality in data hashes
36- anymore (but ` read_vc() ` still does).
39+ * ` is_git2rdata() ` and ` upgrade_data() ` no longer not test equality in data
40+ hashes (but ` read_vc() ` still does).
3741* ` write_vc() ` and ` read_vc() ` fail when ` file ` is a location outside of ` root `
3842 (#50 ).
3943* Reordering factor levels requires ` strict = TRUE ` .
Original file line number Diff line number Diff line change @@ -50,22 +50,18 @@ datahash <- function(file) {
5050# ' @noRd
5151# ' @return a named vector with the old locale
5252set_c_locale <- function () {
53- old_ctype <- Sys.getlocale(category = " LC_CTYPE" )
54- old_collate <- Sys.getlocale(category = " LC_COLLATE" )
55- old_time <- Sys.getlocale(category = " LC_TIME" )
56- Sys.setlocale(category = " LC_CTYPE" , locale = " C" )
57- Sys.setlocale(category = " LC_COLLATE" , locale = " C" )
58- Sys.setlocale(category = " LC_TIME" , locale = " C" )
59- return (c(ctype = old_ctype , collate = old_collate , time = old_time ))
53+ icuSetCollate(
54+ locale = " en_GB" , case_first = " lower" , normalization = " on" ,
55+ case_level = " on"
56+ )
57+ return (c())
6058}
6159
6260# ' Reset the old locale
6361# ' @param locale the output of `set_c_locale()`
6462# ' @return invisible `NULL`
6563# ' @noRd
6664set_local_locale <- function (locale ) {
67- Sys.setlocale(category = " LC_CTYPE" , locale = locale [" ctype" ])
68- Sys.setlocale(category = " LC_COLLATE" , locale = locale [" collate" ])
69- Sys.setlocale(category = " LC_TIME" , locale = locale [" time" ])
65+ icuSetCollate(locale = " default" )
7066 return (invisible (NULL ))
7167}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ expect_is(
1919)
2020expect_equal(
2121 names(output )[1 ],
22- " 9e5edf55ceadd2c148d6d715ea5d12cc8e1538d8 "
22+ " 1d135a85dc9beff3223d6c79f0d8975b559afca7 "
2323)
2424old_locale <- git2rdata ::: set_c_locale()
2525dso <- ds [order(ds $ a ), , drop = FALSE ] # nolint
@@ -64,7 +64,7 @@ expect_equal(
6464)
6565expect_equal(
6666 names(output )[1 ],
67- " 9e5edf55ceadd2c148d6d715ea5d12cc8e1538d8 "
67+ " 1d135a85dc9beff3223d6c79f0d8975b559afca7 "
6868)
6969expect_identical(
7070 names(output ),
You can’t perform that action at this time.
0 commit comments