You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Not able to convert a value into a special character in peoplecode

5 replies [Last post]
Guest's picture
Guest

Hi,

Anybody,please suggest me any method to convert an ASCII value to a special character.Tried with SUBSTITUTE but it seems to be not working...

Thanks
Raj

Guest's picture
Guest (not verified)
Re: Not able to convert a value into a special character in ...

&str_value = Substitute(&str_value, "é", "é");

Have tried coverting the above value to é ,but SUBSTITUTE seems to be not working.Please help me.

Thanks in advance,
Raj

Guest's picture
Guest (not verified)
Re: Not able to convert a value into a special character in ...

&str_value = Substitute(&str_value, "ASCII value", "é");

Have tried converting the above value to é ,but SUBSTITUTE seems to be not working.Please help me.

Lepa's picture
User offline. Last seen 1 year 31 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Not able to convert a value into a special character in ...

I think there is char function in PeopleCode that you can use. char(130) is your é i think. What exactly are you trying to do?

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Re: Not able to convert a value into a special character in ...

Hi Lepa,

I am trying to print a special character é on a HTML page.There is some stringhashtable logic in the peoplecode where all the parameters has to go in a loop and get extracted into a common string.In this scenario,the é enters into the string hash table and gets extracted as some garbled character on the html page but not as é.

So what I've tried doing was,to encode the é into its ASCII code first and then when decoding from the string hash table ,i tried decoding the ASCII code to é.But still i get the ASCII code itself on the HTML page.Please help..

Guest's picture
Guest
Removing the Special Characters from a String

Removing the Special Characters from a String. It may be helpful to somebody.

&str = "SAK1!@#$THI%^V&*(EL";
&strLen = Len(&str);

For &i = 1 To &strLen
&var = Substring(&str, &i, 1);

If Code(&var) >= 65 And
Code(&var) <= 90 Then
&final = &final | &var;
End-If;

End-For;
WinMessage(&final, 0);