davestewart / xjsfl

Rapid development framework for extending Adobe Flash
https://xjsfl.vercel.app
139 stars 46 forks source link

when will the UTF_8 + BOM finish? #2

Closed asinbow closed 12 years ago

asinbow commented 12 years ago

your topic, at the bottom

when will it be applied?

I wrote a ruby script to add UTF_8 BOM header to jsfl

#!/usr/bin/env ruby

UTF_8_BOM = "\xEF\xBB\xBF".force_encoding("binary")

script_dir = File.dirname(__FILE__)

Dir.glob("#{script_dir}/**/*.jsfl").each do |filename|
  content = File.read(filename).force_encoding("binary")
  puts filename
  next if content.start_with?(UTF_8_BOM)
  File.open(filename, "w") do |file|
    file.write(UTF_8_BOM)
    file.write(content)
  end
end

another question: is it a must for every Flash CS* ?

davestewart commented 12 years ago

Damn... I thought this was handled. Sorry you're getting issues.

I found a Komodo macro on the ActiveState site that does the same thing, so I'll make sure that the 1.01 release has the JSFL files output with a BOM

asinbow commented 12 years ago

Great! thx.

davestewart commented 12 years ago

OK - the 1.01 update is live, and all files have had a BOM added. Let me know if it works for you!

asinbow commented 12 years ago

85e405de01 It works. Thank you!

davestewart commented 12 years ago

Brilliant! That's a big relief :)

It's great that you're feeding back about issues, so thank you very much for bringing them up. Please do let me know how you get on with the rest of the tools, on the forum. I'm always trying to make xJSFL better!