I have a sql file (alice.sql) which looks like this in the editor
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_dg_object_extern_pub_dg_extern_pub_status]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)ALTER TABLE [dbo].[dg_object_extern_pub] DROP CONSTRAINT FK_dg_object_extern_pub_dg_extern_pub_status GO
if I load that file into irb it looks like this
f = File.open("alice.sql").readlines
it looks like this :(
=> ["\377\376i\000f\000 \000e\000x\000i\000s\000t\000s\000 \000(\000s\000e\000l\000e\000c\000t\000 \00
I wanted to search and replace some strings in the file but this seems impossible now
any ideas?