Fixed an issue in my company but would love to find a theory on what caused the issue.
We have code from a 3rd party in a report (Nav2017). And we have cloned that report to use ourselves a slightly different way. Our cloned report has not been changed in any way since 05.03.18.
In both reports is a function which replaced the value 0 (zero) in text with the null character 'Ø' as follows:
//NullChar[1] := 157;
NullChar := 'Ø';
OutText := CONVERTSTR(InText,'0',NullChar);
And it has been working this way for years. However today, for no reason I can find, text coming out of this function had the yen symbol (¥) instead of the null symbol.
Tried everything I could think of to fix this until I just hit F11 on the object and it worked as normal again.
What makes this weirder, for me, is the original report (the one we cloned it from) did not have this problem. If BOTH objects had the problem and recompiling BOTH solved it, that might feel like it made more sense! But why one would have the issue, and the other not, I can not explain!
Interestingly if we DEBUG the code then when the debugger starts we see the code in the function as:
NullChar := 'Ø';
When the debugger actually ENTERS the function however, the code suddenly changed to:
NullChar := '¥';
Since the F11 recompile however this does not happen any more.
Any theories welcome, I am baffled!
0
Answers