Author Topic: Code replacement - way to preserve accented characters from Excel in text file?  (Read 5489 times)

Offline vinnie

  • Newcomer
  • *
  • Posts: 25
    • View Profile
    • Vincent MacNamara Photography
I'm using code replacement using \{filename}\ to insert the subjects name into the IPTC and having a problem getting accented characters like á to show correctly. They show as ?

From reading the forums it seems I need the text file to be in UTF-8 format. My original data is in 2 columns in an Excel 2003 spreadsheet. If I copy and paste into Notepad and save as a UTF-8 text file I just get the filename in the IPTC rather than the replacement text. I've tried copying into Word and saving also, but nothing seems to work. Any suggestions?

Vincent

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24217
    • View Profile
    • Camera Bits, Inc.
Vincent,

I'm using code replacement using \{filename}\ to insert the subjects name into the IPTC and having a problem getting accented characters like á to show correctly. They show as ?

From reading the forums it seems I need the text file to be in UTF-8 format. My original data is in 2 columns in an Excel 2003 spreadsheet. If I copy and paste into Notepad and save as a UTF-8 text file I just get the filename in the IPTC rather than the replacement text. I've tried copying into Word and saving also, but nothing seems to work. Any suggestions?

It sounds like you're half way there.  In Notepad, make sure that there is a tab character between the two columns instead of a space.  In the future, be sure to use a text editor that handles Unicode text instead of Microsoft Excel when creating your Code Replacement files.

-Kirk

Offline vinnie

  • Newcomer
  • *
  • Posts: 25
    • View Profile
    • Vincent MacNamara Photography
Thanks Kirk,

I'm stuck with Excel as a source though :( so looking for a workaround that'll get the info from there into the right format in a text file. I need to create a new code replacement file for each job.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24217
    • View Profile
    • Camera Bits, Inc.
Vincent,

I'm stuck with Excel as a source though :( so looking for a workaround that'll get the info from there into the right format in a text file. I need to create a new code replacement file for each job.

Then you'll have to find some way to get the text encoding converted to UTF-8.  There are likely utility apps that will convert text from one encoding to another.

-Kirk

Offline Thomas Campitelli

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Download and install Note Tab Light. It is a wonderful text editor that will enable you to do what you need. It is free, lightweight, and powerful. It is worth buying, but the free version will do everything you need and more.

http://www.notetab.com/

I use in conjunction with Excel and PM and it handles accented characters nicely.

Offline jwvaughn

  • Full Member
  • ***
  • Posts: 140
  • Retired programmer
    • View Profile
I'm stuck with Excel as a source though :( so looking for a workaround that'll get the info from there into the right format in a text file. I need to create a new code replacement file for each job.

I don't have Excel 2003 installed but Excel 2010 has Unicode as one of the "Save As" options under "Save as Type".  I just checked and the accented characters are preserved and a tab is the delimiter.

Jerry