# File /home/ser/Work/rexml/rexml/source.rb, line 81 def encoding(str) if str=~/^7677/ 'UTF16' #unicode big endian elsif str=~/^7776/ 'UNILE' #unicode litle endian elsif str=~/([00-77][00-77])/ #not a guaranteed test won't detect random pairs 'UTF8' else 'ASC' end end