UDF for replacing special or junk characters
Hi
Is there any stanard function for replacing any junk characters with zero? If not, I needed UDF for fulfilling this requirement.
My requirment is .... Am sending some files to r/3 using XI. In the source(txt file) some time some fields have some junk characters. I must make it to zero, the field which has junk. How can I acheive it? is there any UDF using which I can fulfill my requiremnt.
Thanks.
Hi,
Use this UDF
Here a is the input value.
String b = "";
b = a.replaceAll(",", "0");
b = a.replaceAll("@", "0");
Like all the special characters you can take and replace with zero.
return b;
Or
Use the regular expression to check whether special characters occurs in the string then replace with zero
http://www.j2ee.me/developer/technicalArticles/releases/1.4regex/
Regards
Ramesh.
Similar Messages
-
Hi Friends,
Can anyone please provide me UDF for following Condition
my input is 123456 or 1234567.i need read first 4 char and replace it by sw..the output should be sw56 or sw567
Thanks in adv.
Reg,
dinesh
Edited by: Dineshbabu.M on Feb 18, 2011 2:20 PMHi,
This simple UDF will do what you want:
The UDF takes a single String array as input, say s[ ] and it has a single ResultList item result as output.
The complete code is as follows:
s[0]="sw"+s[0].substring(4,s[0].length());
result.addValue(s[0]);
Pass the output of the UDF to the required target field. That's it.
HOPE IT HELPS YOU BUDDY!!!
THANKS
BISWAJIT
Edited by: 007biswa on Feb 18, 2011 7:04 PM -
Adobe Javascript in PDF Form for replacing special character
How to replace special character "/" in to "\" in the text field of PDF Form by using Adobe Javascript.
In PDF Form java script, returns the file path with "/" forward slash, but need to get default in "\" backward slash in the file path.
-
How to replace special characters in string.
Hello,
I want to replace special characters such as , or ; with any other character or " ".I find out there is no such function is java for this.There is only replace() but it accepts only chars.If anybody know how to do this?.
Thanks,Hello,
I want to replace special characters such as , or ;
with any other character or " ".I find out there is no
such function is java for this.There is only replace()
but it accepts only chars.If anybody know how to do
this?.
Thanks,Can't you just do the following?
public class Test
public static void main(String[] args)
String testString = "Hi, there?";
System.out.println(testString.replace(',',' '));
} -
Replacing special characters from xml document/text inside element
Hi
Is there any way to replace the xml codes to special characters inside an entire xml document/ for a text in element.
I want to get the xml codes to get replaced to respective special character(for any special character)
Please see the sample xml xml element below
<Details>Advance is applicable only for < 1000. This is mentioned in Seller's document</Details>
Thanks in advance .. any help will be highly appreciated.So, just to be sure I understand correctly, you want this :
<Details>Advance is applicable only for < 1000. This is mentioned in Seller's document</Details>
to be converted to :
<Details>Advance is applicable only for < 1000. This is mentioned in Seller's document</Details>
If so, I'll say again : the resulting XML document will be invalid.
Extensible Markup Language (XML) 1.0 (Fifth Edition)
The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings " & " and " < " respectively. The right angle bracket (>) may be represented using the string " > ", and MUST, for compatibility, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.
Ask whoever "they" are why they would want to work with not wellformed XML. -
Junk characters coming in the PDF report for Lithuanian language
hi all,
I am facing a problem like some junk characters are coming while generating the report in PDF format in Reports 10g.
Junk characters (i.e something like revere of ?(question mark)) coming only for the special characters in the report when my application language set it as LITHUANIAN_LITHUANIA.UTF8.
Actually our application is supporting multi langauges; like English, German, French, Lithuania etc.
And in the Forms the the characters are appearing correctly... but while generating reports only i am having this issue for LITHUANIAN language.
I am using back end as Oracle 10g verision 2, and front as Reports 10g only.
Is there any way to resolve it?
thanks in advance
renjishHi,
I updated the reports.sh which is in Oracle Home path initailly and tried the report. But its not coming properly, some other junk characters are appearing now for the special characters
For e.g:
Actual English word: Funct. Group Poultry Parts Fresh
Correct Lithuanian Word: Funct. Grupė naminių paukščių dalių, šviežios
In Report: Funct. Grupė naminių paukšĕių dalių, šviežios
Steps i have done:
1. Modified reports.sh with nls_lang as LITHUANIAN_LITHUANIA.UTF8
2. Run the report, output was coming like above e.g.
Is anything wrong what i did?.
or Report engine(reports.sh) will support multi-languages by using the Environment ID only(as you explained before, putting ENVID in repserver.conf - reportserver.)
thanks
renjish -
Vbscript to rename files and replace special characters
Dear Exprt,
would you please help to add addtional requirement for rename and replace special characters for file
by the below script i can re name.
strAnswer = InputBox("Please enter folder location to rename files:", _
"File rename")
strfilenm = InputBox("Enter name:", _
"Rename Files")
Set FSO = CreateObject("Scripting.FileSystemObject")
Sub visitFolder(folderVar)
For Each fileToRename In folderVar.Files
fileToRename.Name = strfilenm & fileToRename.Name
Next
For Each folderToVisit In folderVar.SubFolders
visitFolder(folderToVisit)
Next
End Sub
If FSO.FolderExists(strAnswer) Then
visitFolder(FSO.getFolder(strAnswer))
End If
[email protected]Thx would you please look below what wrong in its run nothing happend no error
strAnswer = InputBox("Please enter folder location to rename files:", _
"Test")
strfilenm = InputBox("Enter name:", _
"Rename Files")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set regEx = New RegExp
'Your pattern here
Select Case tmpChar
Case "&"
changeTo = " and "
Case "/"
changeTo = "_"
Case Else
changeTo = " "
End Select
regEx.Pattern = tmpChar
Sub visitFolder(folderVar)
For Each fileToRename In folderVar.Files
fileToRename.Name = strfilenm & fileToRename.Name
fileToRename.Name = regEx.Replace(fileToRename.Name, tmpChar)
Next
For Each folderToVisit In folderVar.SubFolders
visitFolder(folderToVisit)
Next
End Sub
[email protected] -
Report Pdf output getting Junk characters for some boiler Plate fields
Hi All
For Dunning Letter Report registered in Oracle Applications,made changes in Column headings like added customer number as Kunde for German Letter
but in pdf output it's appearing as junk characters even date field is happening like that. It's happening for German, Spanish, Italy and French Letters. Working ok for Netherlands, English.
any input to fix this solution will be great
Thanks
Kamalakar.GMaybe you check the NLS_LANGUAGE-settings on the client where you "edit" the reports-definition.
-
RegExp for excluding special characters in a string.
Hi All,
Im using Flex RegExpValidator. Can anyone suggest me the correct expression to validate this condition?....
I have tried this expression :----- /^[^///\/</>/?/*&]+$/...But in this it is also negating the alphabets.Also I have tried with opposite condition that in the String we should have alphabets and the expression is:-- ([a-z]|[A-Z]|[0-9]|[ ]|[-]|[_])*..... Please can anyone help me on this.
Thanks in advanced to all.
Munirasorry but you are posting things back that do not make any sense
what do you mean with the below comment?
munira06 wrote:
Yes you are correct ,but I have tried this with single special character
say
Re: RegExp for excluding special characters in a string.
here is a sample app taken from the live docs
using ^[a-zA-Z0-9 \-_]*$ as the regex accepts all characters from a-z, A-Z, 0-9 - [space] and_
run the example tell me what regex you are using and what test strings fail when they should pass or pass when they should fail
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the RegExpValidator. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.events.ValidationResultEvent;
import mx.validators.*;
// Write the results to the
private function handleResult(eventObj:ValidationResultEvent):void {
if (eventObj.type == ValidationResultEvent.VALID) {
// For valid events, the results Array contains
// RegExpValidationResult objects.
var xResult:RegExpValidationResult;
reResults.text = "";
for (var i:uint = 0; i < eventObj.results.length; i++) {
xResult = eventObj.results[i];
reResults.text=reResults.text + xResult.matchedIndex + " " + xResult.matchedString + "\n";
} else {
reResults.text = "";
]]>
</fx:Script>
<fx:Declarations>
<mx:RegExpValidator id="regExpV"
source="{regex_text}" property="text"
flags="g" expression="{regex.text}"
valid="handleResult(event)"
invalid="handleResult(event)"
trigger="{myButton}"
triggerEvent="click"/>
</fx:Declarations>
<s:Panel title="RegExpValidator Example"
width="75%" height="75%"
horizontalCenter="0" verticalCenter="0">
<s:VGroup left="10" right="10" top="10" bottom="10">
<s:Label width="100%" text="Instructions:"/>
<s:Label width="100%" text="1. Enter text to search. By default, enter a string containing the letters ABC in sequence followed by any digit."/>
<s:Label width="100%" text="2. Enter the regular expression. By default, enter ABC\d."/>
<s:Label width="100%" text="3. Click the Button control to trigger the validation."/>
<s:Label width="100%" text="4. The results show the index in the text where the matching pattern begins, and the matching pattern. "/>
<mx:Form>
<mx:FormItem label="Enter text:">
<s:TextInput id="regex_text" text="xxxxABC4xxx" width="100%"/>
</mx:FormItem>
<mx:FormItem label="Enter regular expression:">
<s:TextInput id="regex" text="ABC\d" width="100%"/>
</mx:FormItem>
<mx:FormItem label="Results:">
<s:TextInput id="reResults" width="100%"/>
</mx:FormItem>
<mx:FormItem >
<s:Button id="myButton" label="Validate"/>
</mx:FormItem>
</mx:Form>
</s:VGroup>
</s:Panel>
</s:Application> -
ORA-01460 at REPLACE for strings longer than 4000 characters
the following code works fine for vVar_Value less than 4001 characters but raises an ORA-01460 for strings equal to or larger than 4001 characters in my environments.
declare
vVar_Value VARCHAR2(32000) := '';
begin
for i in 1..4000 loop
vVar_Value := vVar_Value||'X';
end loop;
dbms_output.Put_Line('length(vVar_Value): '||length(vVar_Value));
SELECT REPLACE( vVar_Value, 'NO_MIDDLE_NAME', '') INTO vVar_Value FROM DUAL;
exception
when others then
raise;
end;
any advice would be most apprectiated.
thanks in advance.Why the heck are you using select from dual?
Just use vVar_Value := REPLACE( vVar_Value, 'NO_MIDDLE_NAME', ''); and everything will be OK
in SQL limit for varchar2 is 4K, only in PL/SQL you can use 32K
Gints Plivna
http://www.gplivna.eu -
UDF for Special Character Conversion
Hello All,
Can any one help me with the UDF for special character conversion code.
I mean if a special character is given it should pass a blankspace.
<< Moderator message - Everyone's problem is important >>
Many thanks,
Rahul.
Edited by: Rob Burbank on Oct 29, 2010 4:32 PMHi Rahul ,
the best way to deal with special character is to use proper encoding in your Sender Communication channel it self .So that in your payload you will get proper value .
IF you are getting some special character which is not covered in encoding UTF-8 thne you can use encoding IS0-8859-1 .You can easily refer in help that how to use encoding in your communication channel .
Regards,
Saurabh -
HRSSA Email Notifications shows Junk Characters for Arabic
We have R12 Oracle ERP
RDBMS : 11.1.0.7.0
Oracle Applications : 12.1.1
We are getting email notifications from Self Service (HRSSA), it shows junk characters in the body of the email, wherever we have arabic characters.
Where as in Subject of the email arabic is coming ok.
Below line is Subject of email
FYI: تم اعتماد Leave of Absence الذي يخص خاتتال, Ishaq Ahmed Mohammed
Below part is from Body of email
åæ SYSADMIN
Åäé ÎÇÊÊÇä, Ishaq Ahmed Mohammed Khattal
åÑÓä 10-04-2013 08:55:08
ÇäåÙÑá 221139
ÇäåÙÊåÏ ÇäæçÇÆê: ÌäÇä, ABDULAZEZ ABDULMUTALIB JALAL
ÇÓå ÇäåÓÊÎÏå: AZIZ.MUTALIB
ÇäÊÙäêâ:
Êå ÇÙÊåÇÏ ÊÚêêÑÇÊ Leave of Absence ÇäÊê êÊå ÅÌÑÇÆçÇ Ùäé ÎÇÊÊÇä, Ishaq Ahmed Mohammed Khattal.
çÐÇ ÇäÊÈäêÚ ääÙäå áâ×Hi;
I can not find any similar issue at metalink. I suggest rise SR
Regard
Helios -
Pages 5: Find and replace special characters
Has this feature gone? Or can anyone tell me where to find it? I neeed, for example, to replace double paragraph breaks with single ones, how can I do this?
I can't find it either, but the following appears to work:
Turn on Show Invisibles in the View menu.
Select (highlight) the double para breaks.
Use Command-E (Find using selected text).
Open the Find dialogue box (Command-F) and select Find & Replace.The selected para breaks will be in the Find text entry box, but will not be visible!
Click in the Replace text entry box.
Select (highlight) a single para break.
Go to the Edit menu / Find and select 'Use selection for replace' (it will not show in the Replace entry box).
In the Find & Replace dialogue box, click on the Forward or Back arrows to highlight the selected items (e.g. double para break) where you wish to start replacing in the document.
Use the Replace All / Replace & Find / Replace buttons as per usual.
Not a nice solution, but I hope it gets you going until Apple restores the previous functionality! -
How to Handle Junk Characters in BI Publisher Report?
Hi Team,
I have Created a column in obiee analytics report which has logic as '1/0'. After creating this column I am not getting result for this column(blank).
When Extracted the report into XML file,I am not able to see value for that column as well. This is what I need too.
But issue is, For my layout(below is sample example of my layout) It is not displaying the value as is in Analytics report in BIP Report. In Anlytics report I am getting Blank.In BIP it is giving the Junk Characters. Ex: SG&A row.
I need to replace this Junk characters with space.This is my requirement.
(p) Fuel
0
0
0
0
0
0
0
0
0
(q) Other Variable
1,543
1,325
218
4,123
3,976
147
4,123
3,976
147
Total Cost Of Goods Sold (Excl. S/L)
28,944
30,239
-1,295
87,252
89,408
-2,156
87,252
89,408
-2,156
(r) Straightline Expense
1,679
1,976
-297
4,501
5,929
-1,428
4,501
5,929
-1,428
Total Cost Of Goods Sold
30,622
32,215
-1,593
91,753
95,337
-3,584
91,753
95,337
-3,584
Gross Profit (Excl. S/L)
-133,526
-130,796
-2,730
-397,999
-392,800
-5,991
-397,999
-392,800
-5,199
SG&A
�
�
�
�
�
�
�
�
�
(s) Payroll & Related
4,515
6,158
-1,643
14,910
18,521
-3,611
14,910
18,521
-3,611
here is the XML code for SG&A record:
- <G_1>
<COLUMN0>MAR-2013</COLUMN0>
<COLUMN12>SG&A</COLUMN12>
</G_1>
Can you please help me in achieving this.
Thank You in Advance,
KK.Hi,
there's no direct support for the format triggers out of Oracle Reports. Therefore they are mentioned in the log file and in the created layout after conversion the objects with format triggers are colored red to show, that there you had to do some additional work.
Currently you had to built the logic of format triggers in BI Publisher new. Hve a look in the User Guide, there are some examples for if or choose statements.
regards
Rainer -
Junk characters in data transfer Program
Hello ABAP gurus,
i am facing the problem in an custmom made ABAP Interface program. the program has an option of downloading the files in local system(Windows system) and in Unix system (AL11). when i dwnload the files locally and feed that file to a CRM system, the CRM processes the file correctly but in case if we schedule a job then the CRM reads the file from Unix system and generates an error showing the junk characters for the special european characters. please request you guys to help me in this regard.Hi,
When you download the file locally are able to see the junk character in the file.
Logon on to the unix system and check the file content there and if any junk characters are there, usually when we upload the file then you will have those junk character being populated at the end of the record, open the file in unix and then remove those characters and reprocess that again, it will get through.
Thanks,
Mahesh.
Maybe you are looking for
-
How to have dotted box in Smartform
I wish to create a dotted box something like |_ _ _ _ _| this in Smartform Any ideas how to go about Message was edited by: gagan kasana
-
I keep receiving the error message: itunes could not back up the iphone "....." because the backup session failed. Can anyone advise me on what I can try doing to fix this problem?
-
I write in Pages, my text for iweb pages. When I need it I copy and paste to a text box. Makes since right. I see it in iweb, resize and edit. It takes me 3 tries to post, then the text from Pages is missing. In one case, the blog the placeholder tex
-
How do I uninstall Quick Time Player 10 from a Mac
I cannot find an article that explains how to uninstall Quick Time Player, version 10, from my Mac Snow Leopard. I need to install Quick Time 7 in order to install Quick Time Pro 7. Just moving the program to the Trash did not help. Thanks.
-
MIRO - hitting to purchase varience account
Hi, i am trying to post Invoice, when i am giving PO in invoice screen entries are coming correct. but when i simulate the invoice lot of variance accounts are coming with different values. please advice why purchase variance is coming while simulate