Comments (4)
Ugh yeah, we see these on JRuby too. I've spelunked through the code a few times looking for the bug with no success. I'm pretty sure this is related to the different YAML parsers that various versions of Ruby come with. MRI 1.8 comes with Syck, which parses UTF-8 correctly. MRI 1.9 comes with Syck, which still works, and Psych, which doesn't. MRI 2.0 comes with only Psych, which explains the errors you're seeing.
There's a syck gem available that re-introduces the YAML engine manager, but I'd rather not depend on it considering that Psych is the way forward. It looks like there are a few issues filed against Psych that might help, and it makes sense to run TwitterCLDR's YAML tests against the pre-release of MRI 2.1 to see if our particular issues have been addressed. Short of going on another deep-dive into the YAML dumper, Psych, and libyaml, that's all I can suggest :(
from twitter-cldr-rb.
Do you think it's likely safe to run the gem on ruby 2.0, ignoring those failed tests?
Am I right that the goal of your yaml fixes is just making yaml files containing unicode easier for humans to read and write? I wonder if it makes sense to just abandon this, and either get your fixes into Psych upstream, or give up on having em. But just an idea, I haven't personally encountered much of the pain your custom yaml fixes are meant to ameliorate.
from twitter-cldr-rb.
Yes, the goal of these fixes is to make yaml with unicode dump correctly so it doesn't get loaded as a jumble of unrecognizable characters (which also has the side effect of being easier to read in the yaml files themselves). Since I don't have time to look into these failures now, I'd say let's just ignore them. As I said before, unicode-safe yaml dumping is really meant to help people using MRI 1.8, and since that (still) works, I'd say let's not worry too much about the failures.
from twitter-cldr-rb.
I went ahead and "fixed" these failures (pretty hacky, but c'est la vie). Everything should be passing in the v3.0 branch.
from twitter-cldr-rb.
Related Issues (20)
- CLDR 35 Dev Branch HOT 2
- Formatting a full datetime with a time zone gives current time timezone (PST instead of PDT) HOT 4
- Incorrect list formatter behaviour HOT 2
- Exception when using hyphenate HOT 1
- Incorrect LikelySubtags.locale_for behaviour HOT 1
- Incorrect ListFormatter behaviour HOT 6
- Weekday names `:wide` format is the same as `:abbreviated` HOT 5
- Ruby 3.1.0 with Psych 4 forces YAML.safe_load and throws Psych::DisallowedClass HOT 1
- Month names :narrow format returns array of digits rather than the first letter of each month HOT 3
- Ruby 2.7+ compatibility issue/question HOT 1
- Warning when running Sorbet HOT 2
- Why use :one instead of :name HOT 1
- Remove lone release HOT 1
- Missing titlecase and/or uppercase mappings? HOT 1
- Add support for yMMMMd (October 7, 2022) HOT 2
- `format: :long` breaks when combined with currency formatting HOT 4
- Breaking by word a string containing Japanese and Latin characters HOT 3
- Contributor access revoked HOT 1
- Wrong language name is returned for Norwegian Nynorsk (nn) HOT 1
- Unicode, ICU, CLDR update 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 twitter-cldr-rb.