James Gray
12/28/2007 3:38:00 PM
On Dec 28, 2007, at 9:12 AM, Mark Toth wrote:
> - The problem is that fasterCSV read the file before it=B4s been =20
> converted
> with the " char.
If you're using a CSV parser and you are having to manually translate =20=
the quote, the data probably isn't really CSV data. If you just have =20=
a bunch of fields separated by comma (and they may have quotes in =20
them), you don't need a CSV parser at all:
fields =3D line.split(",")
To answer your question though, you can remove quotes with:
line.delete!('"')
> - The second problem that I have with Rails is that =E5=E4=F6 letters =
doesn=20
> =B4t
> been imported correctly even when I use the $KCODE =3D "utf8" code.
Check to be sure that the file data actually is UTF-8 encoded and that =20=
your database tables are setup for that encoding.
Hope that helps.
James Edward Gray II=