From: SourceForge.net <no...@so...> - 2010-11-03 08:56:00
|
Bugs item #3101708, was opened at 2010-11-02 18:30 Message generated for change (Comment added) made by garrels You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104213&aid=3101708&group_id=4213 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: parser Group: 0.12.0 Status: Closed Resolution: Fixed Priority: 4 Private: No Submitted By: Grzegorz Skoczylas (gskoczylas) Assigned to: Michalis Kamburelis (kambi) Summary: Warning during parsing files starting with BOM Initial Comment: During parsing files starting with BOM (http://goo.gl/mJKoU) PasDoc displays warning: Warning[2]: Error EPasDoc: Invalid character in Pascal input stream (at SourceFile.pas(1)) while parsing unit SourceFile.pas, continuing... In this particular case source file is starting with the #$EF #$BB #$BF characteres. ---------------------------------------------------------------------- Comment By: aguser (garrels) Date: 2010-11-03 09:56 Message: > Ok, my fix was actually complete :) Closing. Mea culpa, sorry, only I wonder why you did not just made the stack array 1-base? We are dealing with bytes there not with chars, anyway thanks for the fix. ---------------------------------------------------------------------- Comment By: Grzegorz Skoczylas (gskoczylas) Date: 2010-11-03 09:53 Message: So far I used the PasDoc.exe downloaded from SourceForge.net. Today I updated the PasDoc's source code and compiled (with Delphi2007). From now on, the PasDoc does not have any problem with BOM. Thanks! ---------------------------------------------------------------------- Comment By: Michalis Kamburelis (kambi) Date: 2010-11-03 06:58 Message: Ok, my fix was actually complete :) Closing. Testcase in tests/ok_bom.pas, so we will not break it again :) Tested with FPC, and should work equally good with non-Unicode Delphi (for Unicode Delphi, BOM is detected in other place, I assume that's working Ok). Please reopen if you still see the problem with Delphi. ---------------------------------------------------------------------- Comment By: Michalis Kamburelis (kambi) Date: 2010-11-03 06:38 Message: I can reproduce with FPC. Our TPasDoc.SkipBOM method stopped working correctly after changes in rev 1221 (BOM array was assumed to be 1-based by the following code). Also something else is broken, not sure yet what (even when TPasDoc.SkipBOM skips correctly, something else still sees the bom character in the stream). I have committed a partial fix, and will look into it more now :) ---------------------------------------------------------------------- Comment By: Grzegorz Skoczylas (gskoczylas) Date: 2010-11-03 01:50 Message: I have Delphi 2007 Professional ---------------------------------------------------------------------- Comment By: aguser (garrels) Date: 2010-11-02 20:27 Message: FPC, Delphi < 2009 or Delphi 2009+ .exe? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104213&aid=3101708&group_id=4213 |