Strange character error "Â "

11 views
Skip to first unread message

Mario Guajardo

unread,
Sep 18, 2016, 4:42:25 PM9/18/16
to am...@googlegroups.com
Hi,
I'm lecturer of a course on Decision Modelling in Business at NHH Norwegian School of Economics.
I've been using the "AMPL for courses" and AMPL IDE for a couple of years, it is usually all fine with it.
I would normally handle all my students' errors by myself, but there is this strange case i wanted to report to you. One of them use Linux (the only one in the class). And the blank spaces in his code are read as this strange character "Â " by AMPL. Any clue on how to fix it?
Once he sent me the code I could see this strange character (I use TextPad and compile from the command prompt; he uses AMPL IDE), while he simply typed a "blank space" on his computer and that's the only thing he sees, so it turns hard for him to fix such a strange error.
See the screenshot enclosed and im sending you his .mod file (which certainly contains several other errors of syntax and logic i can handle myself). What got us curious is about this strange character issues, if you would have any good advice would be good to hear so he could proceed normally during the course. At the moment my practical advice to him is simply to not write any blank space when it is ignored, as it is in this case, but would be good to fix the problem in its root.
Best regards,
Mario Guajardo


err.jpg
1blending.mod

Robert Fourer

unread,
Sep 19, 2016, 12:35:21 PM9/19/16
to am...@googlegroups.com

I have not been able to reproduce this error using the given model file.  When I look at the file using a hex editor, there are no characters between sum{i in oil} and octanegasoline[j] -- neither a space nor the strange characters that you see reported in the error messages:

 

Maybe the characters were deleted by some handling of the file before it was sent.  But in any case, it appears that previous spaces were recorded correctly, even in the same statement:



So the next test I would try (if you haven't done it already) is for the student to delete and retype the lines where the strange characters appeared, to see whether the error is reproducible.

Bob Fourer
am...@googlegroups.com


image004.png
image002.jpg
Reply all
Reply to author
Forward
0 new messages