What does this do?

P

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?

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?

Thanks,
Petr
 
P

Petr Janda

Also Transaction Simple makes this error:

no marshal_dump is defined for class Mutex

/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple.rb:129:in
`dump'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple.rb:129:in
`start_transaction'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in
`block in start_transaction'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in
`each'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in
`start_transaction'
/usr/local/lib/ruby/gems/1.9/gems/pdf-writer-1.1.8/lib/pdf/simpletable.rb:396:in
`render_on'

ANy ideas?
 
H

Heesob Park

2009/4/16 Petr Janda said:
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 ? "=C3=A2=C2=A6" : '')

This is the gruff code:

truncated_label + (truncated_label.length < label.to_s.length ? "=C3=A2^= =C3=80=C2=A6" :
'')

What does a^A do?
It represents Horizontal Ellipsis "=E2=80=A6" =3D=3D "\xE2\x80\xA6" =3D=3D =
"\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
=C2=A0 =C2=A0content =3D "%PDF-#{@version}\n%=C3=83=C2=A2=C3=83=C2=A3=C3= =83=C3=83\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
 
H

Heesob Park

2009/4/16 Petr Janda said:
Hi,

And how do I write those if my keyboard doesnt support them?
Write those with escape sequences.

"\xE2\x80\xA6" and "\xE2\xE3\xCF\xD3"


Regards,

Park Heesob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top