Comments (4)
Fuchsia currently uses the patterns. I'm open to reshaping the API.
Also, I don't think that parsing is used except in tests; the idea was to be able to go from the serialization to the struct and back. Feel free to file a separate issue for skeleton support.
from rust_icu.
Why does Fuchsia use patterns? This would be a good opportunity to migrate them off of patterns.
from rust_icu.
Why does Fuchsia use patterns? This would be a good opportunity to migrate them off of patterns.
By accident. Here is the code. I rewrote the C++ version of the "wisdom" server in rust as a proof of concept for ICU support in rust. This was the shortest way to rewrite, and at the time I was not looking explicitly into what the best API would be.
Also note that there are two goals, which at least in my mind are equally interesting:
- making the ICU functionality available to rust; and
- ECMA-402 conformance
In this particular case I think we can go for the latter and drop the former. If you have suggestions, design proposals and pull requests are most welcome. I think we can keep this issue open until this is implemented.
from rust_icu.
Thanks for the call site! It looks like they aren't actually using patterns; they're using dateStyle/timeStyle. Making an API that lets you specify dateStyle/timeStyle (mapping that to the pattern constructor under the hood) would be 402-compliant.
You already have a dateStyle/timeStyle API:
https://github.com/google/rust_icu/blob/master/rust_icu_udat/src/lib.rs#L72
Why do you need the one a few lines down that accepts a pattern string? That's the one that is problematic, because there's no good way for a user to construct such a pattern string in a locale-agnostic way.
https://github.com/google/rust_icu/blob/master/rust_icu_udat/src/lib.rs#L99
from rust_icu.
Related Issues (20)
- Update rust_icu to support ICU 71.1
- normalize_ustring hard-codes the output capacity to 200 HOT 5
- Support UCPTrie and UMutableCPTrie HOT 5
- Better support for &[u16]
- Add a builder that tests `rust_icu` with the "future" release of ICU
- Add support for ICU 72.1
- Remove the mentions of now unsupported ICU versions
- Expose a few interesting symbols in rust_icu_sys HOT 1
- Does not build in OpenSuSe when versioned_function is used HOT 3
- SOLVED - Error building on macOS HOT 1
- Upgrade to ICU 73.1 HOT 1
- Update bindgen version HOT 2
- `make static-bindgen` failed HOT 8
- Upgrade the build environment to use rust 1.71.0 HOT 1
- make UDataMemory Sync and Send HOT 1
- Verify support for ICU v74
- Drop support for ICU v71
- Add an automated test for buildenv
- Re-enable test-static-linking macos-latest
- rust_icu_utrans-bda1006a1ca627ee: /src/icu/icu4c/source/common/uinvchar.cpp:210: void u_UCharsToChars_74(const char16_t *, char *, int32_t): Assertion `false' failed. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust_icu.