Re: File.new and encoding
- From: "Achim Domma (SyynX Solutions GmbH)" <achim.domma@xxxxxxxx>
- Date: Tue, 29 Nov 2005 19:48:23 +0100
nobu@xxxxxxxxxxxxx wrote:
[...]It would be UTF-8 encoded BOM, but ruby itself never write it automatically.
Can't you show the code?
Trying to reproduce the problem in a smaller example, I figured out, that I'm reading the BOM from one of my source files. Sorry for the confusion. I'm doing something like:
File.open("target","w") do |target|
File.open("source","r") do |source|
source.each_line do |line|
... some processing ...
target.write(line)
end
end
endsource seems to contain the BOM and it is writen to target. Any hint on how to strip the BOM?
regards, Achim .
- Follow-Ups:
- Re: File.new and encoding
- From: Alex Fenton
- Re: File.new and encoding
- References:
- File.new and encoding
- From: Achim Domma (SyynX Solutions GmbH)
- Re: File.new and encoding
- From: Robert Klemme
- Re: File.new and encoding
- From: nobu
- File.new and encoding
- Prev by Date: Re: Wizard quiz
- Next by Date: Re: Wizard quiz
- Previous by thread: Re: File.new and encoding
- Next by thread: Re: File.new and encoding
- Index(es):
Relevant Pages
|