Giter Site home page Giter Site logo

Comments (10)

chastell avatar chastell commented on June 18, 2024 1

BTW: \303\274 is the proper binary representation of UTF-8 ü:

>> "Markus Hüberman" == "Markus H\303\274berman"
=> true

from jeweler.

technicalpickles avatar technicalpickles commented on June 18, 2024

I'm not super familiar with UTF-8 in general, so I'm not sure I can fix this myself.

I've found some notes about doing a File.open to write as utf-8, but it seems to be Ruby 1.9 specific.

from jeweler.

chastell avatar chastell commented on June 18, 2024

Hm, I’m using Ruby 1.9 and UTF-8 in my summary field and both the gemspec file and the resulting gem’s metadata contain the proper UTF-8 strings – i.e., this bug does not manifest itself in my case.

Markus: I tried your name in my gem and it worked. Did you specify the right Ruby file encoding (my Rakefile’s first line is ‘# encoding: UTF-8’)?

from jeweler.

SFEley avatar SFEley commented on June 18, 2024

It would make sense for the generated Rakefile to add # encoding: UTF-8 as its first line. This is harmless in Ruby 1.8 but very important in Ruby 1.9 for consistency.

from jeweler.

danopia avatar danopia commented on June 18, 2024

It probably writes like that under 1.8 because it looks like it uses .inspect to dump the string back out. 1.8 isn't aware about UTF-8, it just sees special chars and escapes them. 1.9 is more intelligent about UTF-8 so it'll output as expected.

from jeweler.

 avatar commented on June 18, 2024

To fix this if you apply the following string:
# encoding: utf-8
with the hash at the top of each generated gemspec file it should resolve the issue.
I could be wrong but this works for me locally

from jeweler.

 avatar commented on June 18, 2024

sorry just realised SFEley also wrote this. +1 on this working :-)

from jeweler.

amatsuda avatar amatsuda commented on June 18, 2024

Just sent a pull request that adds the magic comment on top of Rakefile. #165

The original decoded UTF-8 problem still remains though. I guess this is a Rubygems' problem.

from jeweler.

technicalpickles avatar technicalpickles commented on June 18, 2024

I've merged in amatsuda's change. It adds # encoding: utf-8 to new project's Rakefile.

Between that, and generated gemspects including # encoding: utf-8, things should be good. Unfortunately, it's not working on 1.8 and existing projects would need to add that line to their own Rakefile.

from jeweler.

gmallard avatar gmallard commented on June 18, 2024

In 1.8 you might be able to cure the 1.8 difficulties with:

$KCODE = "U"

Just a thought.

from jeweler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.