Adding byte order mark handling