From: Heesob Park Date: 2009-04-16T13:42:47+09:00 Subject: Re: What does this do? 2009/4/16 Petr Janda : > Im trying to fix two libraries to be compatible with Ruby 1.9 - gruff > and pdf-writer, > > and I came accross this: > > SyntaxError: > /usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72: > invalid multibyte char (US-ASCII) > /usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72: > invalid multibyte char (US-ASCII) > /usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72: > syntax error, unexpected $end, expecting ':' > ...ength < label.to_s.length ? "â¦" : '') > > This is the gruff code: > > truncated_label + (truncated_label.length < label.to_s.length ? "â^À¦" : > '') > > What does a^A do? > It represents Horizontal Ellipsis "…" == "\xE2\x80\xA6" == "\u2026" > I cant even find these on my keyboard let alone find out what they do. > > PDF-writer has something similar > > /usr/local/lib/ruby/gems/1.9/gems/pdf-writer-1.1.8/lib/pdf/writer.rb:712: > invalid multibyte char (US-ASCII) > /usr/local/lib/ruby/gems/1.9/gems/pdf-writer-1.1.8/lib/pdf/writer.rb:712: > syntax error, unexpected $end, expecting keyword_end >    content = "%PDF-#{@version}\n%âãÃÃ\n" > > Is this hidden Japanese or something? > It is just a comment to signal that the file is binary. Refer to http://www.mactech.com/articles/mactech/Vol.15/15.09/PDFIntro/ Regards, Park Heesob