main working on unicode systems