samba / trombone

Converts Tomboy notes files to an Evernote export archive
8 stars 3 forks source link

Print statement is not working with non ascii characters #3

Open jampo opened 2 years ago

jampo commented 2 years ago

Reproduce: Have an non ascii char in Tomboy Note title e.g. Ü,Ä ...

Failing Log Output

Traceback (most recent call last):
  File "./trombone", line 27, in <module>
    main()
  File "./trombone", line 13, in main
    print >>sys.stderr, '>> Title: {0}\n'.format(incoming.title)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 15: ordinal not in range(128)

Caused by print statement of title: https://github.com/samba/trombone/blob/80951aaefe8e1486b7b0ff0d663841fe93a43999/trombone#L13

Suggested: Simple fix remove print of title

Advanced: support non ascii chars here / or at least escape them so no error is thrown

jampo commented 2 years ago

PR created https://github.com/samba/trombone/pull/4