⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (401 Bytes)
Bug #1204
ยป test.rb
test program -
ba (Alexander Beisig)
, 02/25/2009 08:20 AM
a
=
''
.
encode
(
'ASCII-8BIT'
)
a
<<
0xC3
a
<<
0xB6
puts
[
a
.
encoding
,
a
,
a
.
size
].
map
{
|
i
|
i
.
inspect
}.
join
(
' '
)
a
.
force_encoding
(
'UTF-8'
)
puts
[
a
.
encoding
,
a
,
a
.
size
].
map
{
|
i
|
i
.
inspect
}.
join
(
' '
)
b
=
''
.
encode
(
'ASCII-8BIT'
)
b
<<
0xC3
.
chr
b
<<
0xB6
.
chr
puts
[
b
.
encoding
,
b
,
b
.
size
].
map
{
|
i
|
i
.
inspect
}.
join
(
' '
)
b
.
force_encoding
(
'UTF-8'
)
puts
[
b
.
encoding
,
b
,
b
.
size
].
map
{
|
i
|
i
.
inspect
}.
join
(
' '
)
(1-1/1)
Loading...