D
Don Norcott
"200 Millionen Jahre sp=C3=A4ter # 17.39
\n",
"200 Millionen Jahre sp=C3=A4ter # 9.87
3404211707 \n",
"A l'assaut de l'invisible 1977 # 4.91
\n",
"A l'assaut de l'invisible 1990 # 5.18
226603779 \n",
The above 4 lines are data I was attempting to load into an array to
test some code. I was getting what I thought were strange results until
I realized not all characters were being loaded into the element
resulting in column alignment problems.
The data above was cut from a file that had been manipulated a dozen
times in ruby arrays before being written to a file. So it appears the
default way ruby handles extended ASCII(?) is fine.
I have two questions
1) Should I ever have to worry about data being scraped from web pages
not being handled correctly by ruby.
2)How do I flag this data to allow me to manipulate it properly. That is
load it into an array or write to a file.
Tried playing with the following but even if the code below is correct
the extended ascii characters are lost by the time it gets to IRB
str =3D String.new
str.encode(("US-ASCII")
str =3D "Millionen Jahre sp=C3=A4ter"
Any suggestions where I might find some insight.
Thanks Don
-- =
Posted via http://www.ruby-forum.com/.=
\n",
"200 Millionen Jahre sp=C3=A4ter # 9.87
3404211707 \n",
"A l'assaut de l'invisible 1977 # 4.91
\n",
"A l'assaut de l'invisible 1990 # 5.18
226603779 \n",
The above 4 lines are data I was attempting to load into an array to
test some code. I was getting what I thought were strange results until
I realized not all characters were being loaded into the element
resulting in column alignment problems.
The data above was cut from a file that had been manipulated a dozen
times in ruby arrays before being written to a file. So it appears the
default way ruby handles extended ASCII(?) is fine.
I have two questions
1) Should I ever have to worry about data being scraped from web pages
not being handled correctly by ruby.
2)How do I flag this data to allow me to manipulate it properly. That is
load it into an array or write to a file.
Tried playing with the following but even if the code below is correct
the extended ascii characters are lost by the time it gets to IRB
str =3D String.new
str.encode(("US-ASCII")
str =3D "Millionen Jahre sp=C3=A4ter"
Any suggestions where I might find some insight.
Thanks Don
-- =
Posted via http://www.ruby-forum.com/.=