boostorg / locale

Boost.Locale
Boost Software License 1.0
31 stars 70 forks source link

Reconcile `utf8_support` handling in std backend #173

Closed Flamefire closed 1 year ago

Flamefire commented 1 year ago

Document the meaning of the utf8_support enum and refactor/change usages to be consistent and logical.
Add comments where required.

Closes #171

@artyom-beilis Please do a quick check that I didn't miss anything or misunderstood something you wrote in #171

artyom-beilis commented 1 year ago

I added few comments. :-)

codecov[bot] commented 1 year ago

Codecov Report

Merging #173 (ac05f1d) into develop (aa58a42) will increase coverage by 0.37%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/boostorg/locale/pull/173/graphs/tree.svg?width=650&height=150&src=pr&token=vF6mWvgGUn&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg)](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## develop #173 +/- ## =========================================== + Coverage 92.32% 92.69% +0.37% =========================================== Files 112 112 Lines 9878 9820 -58 =========================================== - Hits 9120 9103 -17 + Misses 758 717 -41 ``` | [Impacted Files](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [src/boost/locale/std/codecvt.cpp](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9zdGQvY29kZWN2dC5jcHA=) | `100.00% <100.00%> (ø)` | | | [src/boost/locale/std/collate.cpp](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9zdGQvY29sbGF0ZS5jcHA=) | `88.09% <100.00%> (+13.73%)` | :arrow_up: | | [src/boost/locale/std/converter.cpp](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9zdGQvY29udmVydGVyLmNwcA==) | `86.36% <100.00%> (ø)` | | | [src/boost/locale/std/numeric.cpp](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9zdGQvbnVtZXJpYy5jcHA=) | `91.66% <100.00%> (+14.90%)` | :arrow_up: | | [src/boost/locale/std/std\_backend.cpp](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9zdGQvc3RkX2JhY2tlbmQuY3Bw) | `91.52% <100.00%> (-0.08%)` | :arrow_down: | | [test/test\_std\_collate.cpp](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X3N0ZF9jb2xsYXRlLmNwcA==) | `98.00% <100.00%> (+6.51%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [aa58a42...ac05f1d](https://app.codecov.io/gh/boostorg/locale/pull/173?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg).