Author Topic: Code Replacement glitches in code I created  (Read 5079 times)

Offline vasha

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Code Replacement glitches in code I created
« on: November 23, 2011, 11:21:25 PM »
Kirk,

I worked up my first code replacement for the women's basketball team I cover regularly earlier tonight, just before the game - I use code replacements for college football all the time and don't have much trouble with them, but they come from a photog at another paper who works them up and shares with everyone.

I thought the easiest way to make a new set would be to copy the names from the roster online and then do a bit of clean-up - I made the code two letters and a number, same as each player's jersey number plus the coach, represented by the two letters plus "c" - There is a tab between the code and the player info and a return after each player.

The first player, who wears a zero on her jersey was coded aw0 and even when I reworked her using aw1 to avoid zero in case that one numeral is bad, it still would not work. Meamwhile other players worked just fine.

Also in two or three cases out of about ten players, I get a "\" added to the replacement, (aw2, aw3 and awc will all do this when you test them) but not on other players- the others worked exactly as expected. I was working in Text Edit for the Mac which usually simplifies text and does save in Unicode UTF-8, which was fortunate as I had forgotten that was necessary until I read it on this forum just a few minutes ago. But it does do that automatically, so that 'shouldn't' be a problem.

I'm adding the document here so you can look at it - hopefully you can find what's going wrong. Maybe its a bad idea to copy text from an HTML website and paste into a text editor? I would have thought that wouldn't be a problem but that's what I am suspicious of, as the text looks to my eye to be correct.

I used Text Edit (Mac) v1.7, with PM 4.6.8 on Mac Lion 10.7.2 (Mac Late 2008 MacBook Pro 2.54GHz laptop with 4GB RAM). I was copying text from the Camino 2.0.9 browser and the website I copied the roster from was: http://www.auburntigers.com/sports/w-baskbl/mtt/aub-w-baskbl-mtt.html

Any help will be much appreciated.

Thanks!

[attachment deleted by admin]

Offline Rguzmanphoto

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: Code Replacement glitches in code I created
« Reply #1 on: November 24, 2011, 06:00:20 AM »
Vasha,

I noticed that you had it saved as rich text, after I made it plain text and saved it worked just fine.
Also on aw14, aw23, and aw32 you have a / after the position.

Hope this helps

Happy Thanksgiving
Romeo

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement glitches in code I created
« Reply #2 on: November 24, 2011, 06:47:57 AM »
Vasha,

I worked up my first code replacement for the women's basketball team I cover regularly earlier tonight, just before the game - I use code replacements for college football all the time and don't have much trouble with them, but they come from a photog at another paper who works them up and shares with everyone.

I thought the easiest way to make a new set would be to copy the names from the roster online and then do a bit of clean-up - I made the code two letters and a number, same as each player's jersey number plus the coach, represented by the two letters plus "c" - There is a tab between the code and the player info and a return after each player.

The first player, who wears a zero on her jersey was coded aw0 and even when I reworked her using aw1 to avoid zero in case that one numeral is bad, it still would not work. Meamwhile other players worked just fine.

Also in two or three cases out of about ten players, I get a "\" added to the replacement, (aw2, aw3 and awc will all do this when you test them) but not on other players- the others worked exactly as expected. I was working in Text Edit for the Mac which usually simplifies text and does save in Unicode UTF-8, which was fortunate as I had forgotten that was necessary until I read it on this forum just a few minutes ago. But it does do that automatically, so that 'shouldn't' be a problem.

I'm adding the document here so you can look at it - hopefully you can find what's going wrong. Maybe its a bad idea to copy text from an HTML website and paste into a text editor? I would have thought that wouldn't be a problem but that's what I am suspicious of, as the text looks to my eye to be correct.

I used Text Edit (Mac) v1.7, with PM 4.6.8 on Mac Lion 10.7.2 (Mac Late 2008 MacBook Pro 2.54GHz laptop with 4GB RAM). I was copying text from the Camino 2.0.9 browser and the website I copied the roster from was: http://www.auburntigers.com/sports/w-baskbl/mtt/aub-w-baskbl-mtt.html

Romeo is correct.  The text file must be a Unicode UTF-8 plain text file, not a Rich Text File (.rtf).  I suggest using 'Text Wrangler' which is free from Bare Bones Software:

http://www.barebones.com/products/textwrangler/

Text Wrangler is much nicer than Text Edit for working on Code Replacement files.

-Kirk

Offline vasha

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Code Replacement glitches in code I created
« Reply #3 on: November 25, 2011, 10:09:56 AM »
Thanks for the help all! I have Bare Bones BBEdit Kirk, will that work just as well as Text Wrangler for Code Replacements or should I get the free version specifically for CR?

Offline vasha

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Code Replacement glitches in code I created
« Reply #4 on: November 25, 2011, 11:47:38 AM »
Kirk I went ahead and grabbed TW... it is free after all.
Thanks for your help!
Vasha

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement glitches in code I created
« Reply #5 on: November 25, 2011, 11:56:45 AM »
Thanks for the help all! I have Bare Bones BBEdit Kirk, will that work just as well as Text Wrangler for Code Replacements or should I get the free version specifically for CR?


Yes, I use BBEdit for Code Replacements all the time.  If you already have BBEdit, then you don't need Text Wrangler.

-Kirk