Author Topic: Code Replacement Problem  (Read 6356 times)

Offline Jan

  • Member
  • **
  • Posts: 91
    • View Profile
Code Replacement Problem
« on: May 21, 2007, 01:20:07 AM »
Hello,

i have following problem with the code replacement function, after i have installed 4.5.1.1. i have the problem that the first line in the txt document will not be regcognized by photo mechanic

un1   Torwart Philipp Heerwagen (SpVgg Unterhaching)
un12   Torwart Stefan Riederer (SpVgg Unterhaching)


after putting a un0 in the text file
un1 works again.

Best Regards
Philipp

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24391
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement Problem
« Reply #1 on: May 21, 2007, 06:28:33 AM »
Philipp,

i have following problem with the code replacement function, after i have installed 4.5.1.1. i have the problem that the first line in the txt document will not be regcognized by photo mechanic

un1   Torwart Philipp Heerwagen (SpVgg Unterhaching)
un12   Torwart Stefan Riederer (SpVgg Unterhaching)


after putting a un0 in the text file
un1 works again.

Have you saved your text file in the UTF-8 format?  Also, could you post what your file looks like with the un0 item added?

Thanks,

-Kirk

Offline Jan

  • Member
  • **
  • Posts: 91
    • View Profile
Re: Code Replacement Problem
« Reply #2 on: May 21, 2007, 09:25:38 AM »
Yes the txt file is saved as utf8

if i left a blank line as first line then everything works.

un0
un1    Torwart Philipp Heerwagen (SpVgg Unterhaching)
un12   Torwart Stefan Riederer (SpVgg Unterhaching)


« Last Edit: May 21, 2007, 11:23:50 PM by Faas »

Offline Jan

  • Member
  • **
  • Posts: 91
    • View Profile
Re: Code Replacement Problem
« Reply #3 on: May 22, 2007, 09:26:53 AM »
Does nobody else have the problem that PM doesn 't recognised the first line i a code replacement txt file ?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24391
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement Problem
« Reply #4 on: May 22, 2007, 05:13:41 PM »
Philipp,

Does nobody else have the problem that PM doesn 't recognised the first line i a code replacement txt file ?

Could you send me the file that causes trouble for you?  Then I can analyze it.

Thanks,

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24391
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement Problem
« Reply #5 on: May 23, 2007, 09:45:07 AM »
Philipp,

Does nobody else have the problem that PM doesn 't recognised the first line i a code replacement txt file ?

Could you send me the file that causes trouble for you?  Then I can analyze it.

Thanks for the sample files.  The problem is caused by your text editor's insertion of a UTF-8 Byte Order Marker which is tripping up the parsing and making it basically impossible for you to enter the first code in your file.  It is perfectly reasonable and not unexpected for a text editor to insert the BOM.  It is my fault for not taking that into consideration.  For a workaround just start your files out with a single blank line and then all codes will work.

I have modified the code to deal with the BOM at the beginning of the file.  The fix will appear in the next update.

-Kirk

Offline Jan

  • Member
  • **
  • Posts: 91
    • View Profile
Re: Code Replacement Problem
« Reply #6 on: May 23, 2007, 10:13:55 AM »
Thx Kirk,

the texteditor i used is the microsoft editor which came with my windows xp prof installation.

Best Regards

Philipp