twitter / twitter-cldr-rb

Ruby implementation of the ICU (International Components for Unicode) that uses the Common Locale Data Repository to format dates, plurals, and more.
Apache License 2.0
672 stars 93 forks source link

Provide file encoding explicitly in resource loader #217

Closed CAMOBAP closed 5 years ago

CAMOBAP commented 5 years ago

I faced with encoding issue on windows.

Code 3.localize(:zh).spellout produce 三 on unix it works properly and return

This PR fix encoding issue on windows

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

camertron commented 5 years ago

Huh weird, thanks @CAMOBAP795. I thought Ruby's default external encoding was UTF-8, but I guess maybe not on Windows?

CAMOBAP commented 5 years ago

but I guess maybe not on Windows?

Yep, unfortunately it may be different depending on version in my case it was Windows-1252

CAMOBAP commented 5 years ago

@camertron maybe you can share some visibility is this fix in https://rubygems.org/gems/twitter_cldr/versions/4.4.4 or planned for future ?

camertron commented 5 years ago

Woops, sorry @CAMOBAP795, I meant to comment here that v4.4.4 contains the changes from this PR. Thanks again!