Skip to content

Commit 8100d47

Browse files
committed
(#476) C locale is now en_US_POSIX; warn if an explicitly set locale ends up with ICU's returning a resource bundle from the root locale
1 parent 2dac158 commit 8100d47

File tree

171 files changed

+430
-541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+430
-541
lines changed

.devel/sphinx/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Some environment variables:
101101
102102
103103
104-
## Final Notes
104+
## Getting Help
105105
106106
If you do not manage to set up a successful build, do not
107107
hesitate to [file a bug report](https://github.com/gagolews/stringi/issues).

.devel/sphinx/news.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
# Changelog
22

33

4-
## 1.8.1 (2023-11-08)
4+
## 1.8.1 (2023-11-09)
55

66
* [GENERAL] ICU bundle updated to version 74.1 (Unicode 15.1, CLDR 44).
77

8-
* [BACKWARD INCOMPATIBLE] [BUILD TIME] Support for Solaris has now been dropped.
9-
The package is no longer shipped with the very outdated ICU55 bundle.
8+
* [BACKWARD INCOMPATIBILITY] [BUILD TIME] Support for Solaris has now been
9+
dropped. The package is no longer shipped with the very outdated ICU55 bundle.
1010
A compiler supporting at least C++11 as well as ICU >= 61 are now required.
1111

12-
* [BACKWARD INCOMPATIBLE] #469: Missing date-time fields in
12+
* [BACKWARD INCOMPATIBILITY] #469: Missing date-time fields in
1313
`stri_datetime_parse` and `stri_datetime_create` now default to today's
1414
midnight local time.
1515

16+
* [BACKWARD INCOMPATIBILITY] Removed the long-deprecated and defunct
17+
`fallback_encoding` parameter of `stri_read_lines` and the ellipsis
18+
parameter of `stri_opts_collator`, `stri_opts_regex`, `stri_opts_fixed`,
19+
and `stri_opts_regex`.
20+
1621
* [BUILD TIME] As per the suggestion of Prof. Brian Ripley, `icudt74l`
1722
(ICU data - little endian) is now included in the source tarball (compressed
1823
with xz to save space). This allows for building *stringi* on systems with
1924
no internet access.
2025

21-
* [NEW FEATURE] #476: A warning is emitted when selecting an unknown locale
22-
for collation as it most likely indicates that a wrong resource is being
23-
returned.
26+
* [NEW FEATURE] #476: In break iterator-, date-time-, and collator-based
27+
operations (e.g., `stri_sort`), a warning is emitted when the *root* ICU
28+
resource bundle is returned when using an *explicitly* requested locale.
29+
This might happen when we pass an 'unknown' `locale` argument to these
30+
functions. Note that when relying on the default `locale=NULL` argument,
31+
no warning is emitted. In such a case, checking
32+
if the default locale as returned by `stri_enc_get` is amongst
33+
those listed in `stri_enc_list` is recommended.
2434

2535
* [NEW FEATURE] The `C` locale identifier now resolves to `en_US_POSIX`.
2636

.devel/sphinx/rapi/about_locale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Your program should avoid changing the default locale. All locale-sensitive func
3434

3535
One of many examples of locale-dependent services is the Collator, which performs a locale-aware string comparison. It is used for string comparing, ordering, sorting, and searching. See [`stri_opts_collator`](stri_opts_collator.md) for the description on how to tune its settings, and its `locale` argument in particular.
3636

37-
When choosing a resource bundle that is not available in the requested locale nor in its more general variants (e.g., \'es_ES\' vs \'es\'), a warning is emitted.
37+
When choosing a resource bundle that is not available in the explicitly requested locale (but not when using the default locale) nor in its more general variants (e.g., \'es_ES\' vs \'es\'), a warning is emitted.
3838

3939
Other locale-sensitive functions include, e.g., [`stri_trans_tolower`](stri_trans_casemap.md) (that does character case mapping).
4040

.devel/sphinx/rapi/stri_datetime_add.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ print(x)
6868
```
6969

7070
```
71-
## [1] "2024-01-08 17:00:48 AEDT"
71+
## [1] "2024-01-09 11:24:49 AEDT"
7272
```
7373

7474
```r
7575
stri_datetime_add(x, -2, units='months')
7676
```
7777

7878
```
79-
## [1] "2023-11-08 17:00:48 AEDT"
79+
## [1] "2023-11-09 11:24:49 AEDT"
8080
```
8181

8282
```r

.devel/sphinx/rapi/stri_datetime_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,5 @@ stri_datetime_create(hour=15, minute=59)
9696
```
9797

9898
```
99-
## [1] "2023-11-08 15:59:00 AEDT"
99+
## [1] "2023-11-09 15:59:00 AEDT"
100100
```

.devel/sphinx/rapi/stri_datetime_fields.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ stri_datetime_fields(stri_datetime_now())
7777

7878
```
7979
## Year Month Day Hour Minute Second Millisecond WeekOfYear WeekOfMonth
80-
## 1 2023 11 8 17 0 49 139 46 2
80+
## 1 2023 11 9 11 24 49 982 46 2
8181
## DayOfYear DayOfWeek Hour12 AmPm Era
82-
## 1 312 4 5 2 2
82+
## 1 313 5 11 1 2
8383
```
8484

8585
```r
@@ -88,9 +88,9 @@ stri_datetime_fields(stri_datetime_now(), locale='@calendar=hebrew')
8888

8989
```
9090
## Year Month Day Hour Minute Second Millisecond WeekOfYear WeekOfMonth
91-
## 1 5784 2 24 17 0 49 148 9 4
91+
## 1 5784 2 25 11 24 49 986 9 4
9292
## DayOfYear DayOfWeek Hour12 AmPm Era
93-
## 1 54 4 5 2 1
93+
## 1 55 5 11 1 1
9494
```
9595

9696
```r

.devel/sphinx/rapi/stri_datetime_format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,5 @@ stri_datetime_format(stri_datetime_now(), 'datetime_relative_medium')
221221
```
222222

223223
```
224-
## [1] "today, 5:00:49 pm"
224+
## [1] "today, 11:24:50 am"
225225
```

.devel/sphinx/rapi/stri_enc_detect2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ stri_enc_detect2(str, locale = NULL)
1212

1313
## Arguments
1414

15-
| | |
16-
|----------|-------------------------------------------------------------------------------------------------------------------------|
17-
| `str` | character vector, a raw vector, or a list of `raw` vectors |
18-
| `locale` | `NULL` or `''` for default locale, `NA` for just checking the UTF-\* family, or a single string with locale identifier. |
15+
| | |
16+
|----------|-----------------------------------------------------------------------------------|
17+
| `str` | character vector, a raw vector, or a list of `raw` vectors |
18+
| `locale` | `NULL` or `''` for the default locale, or a single string with locale identifier. |
1919

2020
## Details
2121

.devel/sphinx/rapi/stri_opts_brkiter.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ stri_opts_brkiter(
1818
skip_line_soft,
1919
skip_line_hard,
2020
skip_sentence_term,
21-
skip_sentence_sep,
22-
...
21+
skip_sentence_sep
2322
)
2423
```
2524

@@ -38,7 +37,6 @@ stri_opts_brkiter(
3837
| `skip_line_hard` | logical; perform no action for hard, or mandatory line breaks |
3938
| `skip_sentence_term` | logical; perform no action for sentences ending with a sentence terminator (\'`.`\', \'`,`\', \'`?`\', \'`!`\'), possibly followed by a hard separator (`CR`, `LF`, `PS`, etc.) |
4039
| `skip_sentence_sep` | logical; perform no action for sentences that do not contain an ending sentence terminator, but are ended by a hard separator or end of input |
41-
| `...` | \[DEPRECATED\] any other arguments passed to this function generate a warning; this argument will be removed in the future |
4240

4341
## Details
4442

.devel/sphinx/rapi/stri_opts_collator.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ stri_opts_collator(
1616
case_level = FALSE,
1717
normalization = FALSE,
1818
normalisation = normalization,
19-
numeric = FALSE,
20-
...
19+
numeric = FALSE
2120
)
2221

2322
stri_coll(
@@ -29,8 +28,7 @@ stri_coll(
2928
case_level = FALSE,
3029
normalization = FALSE,
3130
normalisation = normalization,
32-
numeric = FALSE,
33-
...
31+
numeric = FALSE
3432
)
3533
```
3634

@@ -47,7 +45,6 @@ stri_coll(
4745
| `normalization` | single logical value; if `TRUE`, then incremental check is performed to see whether the input data is in the FCD form. If the data is not in the FCD form, incremental NFD normalization is performed |
4846
| `normalisation` | alias of `normalization` |
4947
| `numeric` | single logical value; when turned on, this attribute generates a collation key for the numeric value of substrings of digits; this is a way to get \'100\' to sort AFTER \'2\'; note that negative or non-integer numbers will not be ordered properly |
50-
| `...` | \[DEPRECATED\] any other arguments passed to this function generate a warning; this argument will be removed in the future |
5148

5249
## Details
5350

0 commit comments

Comments
 (0)