Page 1 of 1
Oconv MCP is not working
Posted: Mon Apr 27, 2009 3:42 am
by basu.ds
X=Oconv("John^CSmith^X1-234", "MCP") X = "John.Smith.1-234"
The above is supposed to remove all unprintable characters but it is not working on informations server 8.0.1 on windows.
It is returning the same value of the argument .can any one help....
Thanks in advance,
Posted: Mon Apr 27, 2009 4:46 am
by ray.wurlod
Code: Select all
FUNCTION TestMCP(Arg1)
TheString = "John" : Char(3) : "Smith" : Char(24) : "X1-234"
Ans = Oconv(TheString, "MCP")
Call DSLogInfo("Value of Status() is " : Status(), "Report")
RETURN(Ans)
Returns "John.Smith.X1-234" and Status() is 0.
Therefore I can't reproduce the problem.
I am on 8.0.1 on Windows, the same as you.
Posted: Mon Apr 27, 2009 4:59 am
by basu.ds
Ans=Oconv(Arg1,"MCP")
This Oconv-MCP function is supposed to remove any unprintable characters in "Arg1"
But on Information server 8.0.1 -windows the MCP function returns the same value of Arg1 and does not remove the unprintable characters
can any body explain why?
Is this a bug in 8.0.1 and does it require a patch?
Kindly help...
Thanks,
Posted: Mon Apr 27, 2009 6:25 am
by chulett
Perhaps your characters are not "unprintable"? Are they actually a single control character or are they two characters, a "^" and a "C" for example like you typed in?
Re: Oconv MCP is not working
Posted: Mon Apr 27, 2009 7:17 am
by JRodriguez
basu.ds,
"MCP" convert the non printable character to dots ... it won't remove the non printable characters
The non printable character should be embedded in the string .. in your sample you don't have the actual characters, you have a representation which is printable, so the function just give back the string that you passed
Try below sample which contain embedded tabs character ...
Oconv(" Rodriguez", "MCP")
Result:
..Rodriguez
Posted: Mon Apr 27, 2009 4:17 pm
by ray.wurlod
So that's two votes for "it does work" and then there's you.
What does this suggest to you?
Posted: Mon Apr 27, 2009 10:57 pm
by basu.ds
but same conversion is working in 7.5.1 but not in 8.0.1
Posted: Mon Apr 27, 2009 11:53 pm
by basu.ds
Hi kamesh_sk
Yes your understanding is correct,
Please any one help me on this..
Thanks in advance,