update copyright
don't use LINE_MAX, and various unicode fixes