modifications for unicode handling in files