Character checking for arabic

Hi
I have an issue with one function which used to work perfectly when the characterset of the database was al32utf8 ,
Now we have changed the characterset to ar8mswin1256 , due to use of arabic language in the application.
Below is the function
CREATE OR REPLACE FUNCTION fn_get_string_lang(pv_string VARCHAR2)
  RETURN VARCHAR2 AS
  v_str_type VARCHAR2(2):='E';
BEGIN
  FOR i IN 1..length(pv_string)
    LOOP
      IF (ascii(SUBSTR(pv_string,i,1)) > 256) THEN
        v_str_type := 'A';
        EXIT;
      END IF;
    END LOOP;
    RETURN v_str_type;
EXCEPTION
  WHEN OTHERS THEN
    insert_error(-123, SQLERRM, NULL, NULL, 'fn_get_string_lang');
    RETURN 'E';
END fn_get_string_lang;In the above function we check if the characters entered are in arabic.... this used to work in al32utf8 , but nit now.
Please Help.

Nitin Chauhan wrote:
Hi
I have an issue with one function which used to work perfectly when the characterset of the database was al32utf8 ,
Now we have changed the characterset to ar8mswin1256 , due to use of arabic language in the application.I guess that you didnt migrate the data but rather set up a new database with ar8mswin1256.
I would be more helpful if you had post the erroneous result, but i guess again that always E is returned.
So what will you expected from the ollowing condition if working on a single byte characterset?
IF (ascii(SUBSTR(pv_string,i,1)) > 256) THENregards

Similar Messages

  • The spell check for arabic language in pages v 5.2 are Not working ! please Help !

    The spell check for arabic language in pages v 5.2 in mavericks are Not working ! please Help !

    MANKWT wrote:
    No i Did Not !
    Perhaps you can find an Arabic dictionary for OpenOffice.  That may also work with OS X.
    http://m10lmac.blogspot.com/2011/06/extra-spell-checking-dictionaries-for.html

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • Generating unicode for arabic character similar to Character map in c#

    Hi,
    I need to generate Unicode characters for Arabic character. Similar to character map dialog in windows os.
    Example: \uFE97 represent 'ﺗ' and \uFEAE represent 'ﺮ' 
    in the character map.
    Let me know how to get this similar Unicode from the Arabic string in c#.
    Thanks in advance.

    Hi SudheendraRao,
    I have made a test with the code from Joel, and the 'ﺗ' and 'ﺮ' came out right.
    >> if i give string "القائمة" i am expecting "\u0627\uFEDF\uFED8\uFE8E\uFE8B\uFEE4\uFE94" but i am getting Unicode like this "\u0629\u0645\u0626\u0627\u0642\u0644\u0627".
    I am not sure the result of string "القائمة" should be, but if I split the string to one char one by one, I could not get the result which you expected.
    Could you share us the some key code about your project? It would be better if you could convert “\u0627\uFEDF\uFED8\uFE8E\uFE8B\uFEE4\uFE94” to string to see if the result was equal with “القائمة”
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Checking for Paragraph sign / Return Character with indexOf()

    Hello all
    Al want to use String.indexIf() method to check for any Paragraph signs, or Return characters in a string, then delete or change them.
    I already tried the following, without success!
    int index = myAddress.indexOf('\r');
    and ('\n')
    Please help
    Thanks in advance
    Jaco

    just try to use a StringBuffer or the more diffcult way put the string into a StringTokenizer and set for delimitters all the paragraphs and whitespaces and then tokenize the string. You just have to determine the length of the splitstring and then you know where the characters are you look for

  • Touch Events: How can I check for a button being pressed while another button is being held down?

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

  • Checking for an updated variable value in symbol timeline

    I'm making a puzzle which involves moving crates in a specific order to get a character from one side to the other. Take a look at http://tinyurl.com/c4vwcj9 to get the gist of it.
    Each crate is a symbol with it's own timeline. A crate may only move a pre-determined direction and distance once clicked. No more than 2 crates can be pulled out of the grid at any one time.
    The timeline of each symbol has three states: "Original", "Moved" and "Returned".
    If you have a play around with the puzzle as it stands so far, you will see most of the logic arguments work ok. However, the problem I have is when you pull a crate out of the grid and it needs to check if it can move back into place.
    To see what I mean:
    - Pull out the bottom left corner crate
    - Move the crate to the immediate right, thereby blocking the previous crate
    - Try to move the bottom left corner crate again (you should get an error message and it shouldn't move - this is fine)
    - Move the other crate back to it's original position to unblock the previous crate
    - Try to move the bottom left corner crate a final time (you still get the error message and it doesn't move - this is not fine!)
    A quick debug has revealed the second mouse click doesn't fetch the updated variable AFTER the symbol timeline begins to play, but the same methodology works just fine for crates that check for impeded movement BEFORE a symbol timeline is played (try one of the inner crates). Why isn't it getting the updated value and what can I do to solve it?
    Below is a sample of the code specific to the bottom left crate. I've highlighted the variable and arguments specific to the problem. Please excuse what is no doubt poor Javascript coding conventions - I only started learning this last week!
    //-- Get needed variables
    // Check to see if other crate is impeding movement and define value as a variable
    var myCrateCheck = sym.getComposition().getStage().getSymbol("_b_2x1crate_h").getVariable("Crate2");
    // Check to see what this crate's status is and define value as a variable
    var mySelfCheck = sym.getComposition().getStage().getSymbol("_bl_3x1crate_h").getVariable("Crate1");
    // Check to see if other crates have been moved out of the main grid. Parse value as an integer in base 10.
    var myGridCheck1 = parseInt(sym.getComposition().getStage().getSymbol("_br_2x1crate_v").getVariable("Crate3_ grid"),10);
    var myGridCheck2 = parseInt(sym.getComposition().getStage().getSymbol("_bl_4x1crate").getVariable("Crate4_gr id"),10);
    var myGridCheck3 = parseInt(sym.getComposition().getStage().getSymbol("_bl_2x2crate").getVariable("Crate5_gr id"),10);
    var myGridCheck4 = parseInt(sym.getComposition().getStage().getSymbol("_cl_2x1crate_h").getVariable("Crate9_ grid"),10);
    var myGridCheck5 = parseInt(sym.getComposition().getStage().getSymbol("_cl_1x1crate_1").getVariable("Crate13 _grid"),10);
    var myGridCheck6 = parseInt(sym.getComposition().getStage().getSymbol("_cr_3x1crate_h").getVariable("Crate16 _grid"),10);
    var myGridCheck7 = parseInt(sym.getComposition().getStage().getSymbol("_tl_2x1crate_h").getVariable("Crate17 _grid"),10);
    var myGridCheck8 = parseInt(sym.getComposition().getStage().getSymbol("_tc_2x2crate").getVariable("Crate18_g rid"),10);
    var myGridCheck9 = parseInt(sym.getComposition().getStage().getSymbol("_tr_2x1crate_h_1").getVariable("Crate 19_grid"),10);
    var myGridCheck10 = parseInt(sym.getComposition().getStage().getSymbol("_tl_3x1crate_h").getVariable("Crate20 _grid"),10);
    var myGridCheck11 = parseInt(sym.getComposition().getStage().getSymbol("_tr_2x1crate_h_2").getVariable("Crate 21_grid"),10);
    // Create a variable called myGridCheckSum, make sure it's a number and sum the above
    var myGridCheckSum = 0;
    myGridCheckSum = myGridCheck1 + myGridCheck2 + myGridCheck3 + myGridCheck4 + myGridCheck5 + myGridCheck6 + myGridCheck7 + myGridCheck8 + myGridCheck9 + myGridCheck10 + myGridCheck11;
    //-- Logic & Conditional Statements
    // If this crate is in any position other than "Moved", and more than 1 box is already out of grid zone - prevent move and alert
    if ((mySelfCheck != "Moved") && (myGridCheckSum >1)){
    alert('Too many boxes outside of grid zone');
    sym.stop();
    // Or else, if this crate is in any position other than "Moved", but less than 2 boxes are out of grid zone - allow move
    else if ((mySelfCheck != "Moved") && (myGridCheckSum <2)){
    sym.play();
    // If this crate has moved but the other crate hasn't moved, play remainder of symbol timeline
    else if ((mySelfCheck == "Moved") && (myCrateCheck != "Moved")){
    sym.play(3001)
    // If this crate has moved and the other crate is also moved, alert and loop back on timeline
    else if (myCrateCheck == "Moved"){
    // Alert user to say crate cannot be moved
    alert('This box is being blocked by another!');
    sym.play(2999);

    Resolved. Silly little syntax error on a variable rewrite on another symbol!

  • Carriage return in textarea - how do I check for and remove it???

    I have an html form that has a <textarea> element for user input. I work mainly with Java and some JavaScript. Since carriage returns are permitted in a <textarea> element, upon retrieving the value submitted, my Java and/or JavaScript variables contain carriage returns as well, making the values incomplete.
    For Example :
    String dataSubmitted = request.getParameter("formInput");
    <script language="JavaScript">
    var textValue = "<%=dataSubmitted%>";
    ....//do other stuff
    </script>When I view the source of my JSP page, the above statement of code looks like this:
    var textValue = "This is some text that
    I submitted with a carriage return";I'm putting the text submitted through this form into a mysql database, and when I pull up the values I find that it has recorded the carriage return as well. There is an actual symbol representing a carriage return in the db field.
    What I'd like to do is use some Java code to go through each character of the String and find and remove the carriage return, perhaps replacing it with an empty space instead. But how do I check for a carriage return in a String variable?
    Also, is there a way to use JavaScript to alert the user when the carriage return button is pressed when they're in the <textarea>?
    Any input is appreciated,
    Thank You,
    -Love2Java

    What I'd like to do is use some Java code to go through
    each character of the String and find and remove the
    carriage return, perhaps replacing it with an empty
    space instead. But how do I check for a carriage return
    in a String variable?The carriage return is represented by the \r. Generally there is also a newline, the \n. You can use String#replaceAll() to replace occurences of them by a space.
    string = string.replaceAll("\r\n", " ");
    Also, is there a way to use JavaScript to alert the user
    when the carriage return button is pressed when they're
    in the <textarea>?You can capture keys using the 'onkeypress' attribute. The keyCode of a the return key is 13. So simply catch that:<textarea onkeypress="if (event.keyCode == 13) alert('You pressed the return button.'); return false;"></textarea>The return false prohibits the linebreak being inserted. If you remove that, then it will be inserted anyway.

  • Language:  Filename with characters for arabic turns question mark

    Language: Filename with characters for arabic turns question mark
    OS: Solaris 9
    Machine: Sun-Fire 25K
    There is an adobe distiller software that is configured and a java apps. There are postscript files that are being converted to .pdf format using the adobe distiller. Using the GUI (using the Exceed; for remote access), when they use GUI to convert the postscripts to pdf files, the long filenames have the corresponding characters for arabic reading purpose. This is OK.
    When we use the windows RUN to telnet the server and convert the postscripts to pdf, it gives a question marks characters in the filenames ( this; is a sample; filename; ?? ??? ??; right.pdf )
    We are not sure now if we have to add a package of arabic or a patch to resolve this problem.
    Message was edited by:
    yurioira32
    Message was edited by:
    yurioira32

    Solution found, I'll post the work around to those who might encounter the same problem.
    Somewhere in the layers of technology (webwork or weblogic I'd guess), the servlet response is encoded into UTF-8 regardless. The encoding in the database was ISO-8859-1. Sending ISO encoded bytes by UTF-8 caused the conflicting character codes (anything above 127) to show up as undefined.
    The fix is to decode the input byte array into ISO-8859 string, then encode that string into UTF-8, which can be send by Weblogic.
    isoConvert = new String(buf, "ISO-8859-1");
    out.write(isoConvert.getBytes("UTF-8"), 0, isoConvert.getBytes("UTF-8").length);

  • Check for non-numeric characters in textbox input

    I have a form with several textboxes, each of which can accept numeric input. I want to write a validation/ plsql block that checks for a non-numeric character in the input, so that my user sees a customized error message rather than a database error. Any tips on how I can achieve that? Is there any function like "isalpha" in C, which can directly do the job?
    Also, some of these numeric fields should allow commas, since people put commas in larger numbers.
    Any help is greatly appreciated.

    Arie,
    i figured it out. turns out, i had some confusion in my mind. i modified Taneal's solution to use it in my already existing validations of type 'function returning error text' and it works fine.
    the problem before was that i was running 2 separate validations on the same field, and probably due to the sequence numbers, i was getting a numeric or value error. now, i've combined all validations into a single validation and it works fine.
    and honestly, i'm pretty bad with reg. ex. :D

  • Flat File Load Issue - Cannot convert character sets for one or more charac

    We have recently upgraded our production BW system to SPS 17 (BW SP19)
    and we have issues loading flat files (contain Chinese, Japanese and
    Korean characters) which worked fine before the upgrade. The Asian
    languages appear as invalid characters (garbled) as we can see in PSA. The Character Set
    Settings was previously set as Default Setting and it worked fine until
    the upgrade abd we referred to note 1130965 and with the code page 1100
    the load went through (without the Cannot convert character sets for one or more characters error) however the Asian language characters will appear
    as invalid characters. We tried all the code pages suggested in the note e.g.
    4102, 4103 etc on the info packages but it did not work. Note that the
    flat files are encoded in UTF-8.

    I checked lower case option for all IO
    When i checked the PSA failed log no of records processed is "0 of 0" my question is with out processing single record system is througing this error message.
    When i use same file loading from local workstation no error message
    I am thinking when  I FTP the file from AS/400 to BI Application Server(Linex) some invalid characters are adding but how can we track that invalid char?
    Gurus please share your thoughts on this I will assign full points.
    Thanks,

  • Cannot convert character sets for one or more characters

    Hello,
    Issue:
    Source File:   Test.csv
    Source file dropped on application server as csv file via FTP
    Total records in csv file 102396
    I can able to load only 38,000 records after that I am getting error message  " convert character sets for one or more characters"  while loading into PSA .
    If i load same csv file from local workstation I am not getting any error message I can able to load total 102396 records.
    I am guessing while FTP the file into Application server some invalid codes adding?
    But I am FTP 7 files,  out of 7 I am unable to load only 1 file.
    Anybody have faced this kind of problem please share with me I will assign full points
    Thanks

    I checked lower case option for all IO
    When i checked the PSA failed log no of records processed is "0 of 0" my question is with out processing single record system is througing this error message.
    When i use same file loading from local workstation no error message
    I am thinking when  I FTP the file from AS/400 to BI Application Server(Linex) some invalid characters are adding but how can we track that invalid char?
    Gurus please share your thoughts on this I will assign full points.
    Thanks,

  • Convert character sets for one or more characters

    Hello,
    Issue:
    Source File: Test.csv
    Source file dropped on application server as csv file via FTP
    Total records in csv file 102396
    while loading into PSA  I can able to load only 38,000 records after that I am getting error message " convert character sets for one or more characters" .
    If i load same csv file from local workstation I am not getting any error message I can able to load total 102396 records.
    Anybody have faced this kind of problem please share with me I will assign full points
    Thanks

    Hi,
    check
    Flatfile Issue
    Regards,
    Arek

  • How to Change National character set for a database

    Hi All,
    My database is Oracle 10G. Stand alone DB.
    National character set for my DB is "WE8ISO8859P1" and need to change national character set to UTF8.
    Need Help on this.
    Thanks in advance.
    Regards,
    Suresh

    Please go through the topic,
    [http://arjudba.blogspot.com/2009/02/what-is-national-character-set.html|http://arjudba.blogspot.com/2009/02/what-is-national-character-set.html] [http://arjudba.blogspot.com/2009/03/unicode-characterset-in-oracle-database.html|http://arjudba.blogspot.com/2009/03/unicode-characterset-in-oracle-database.html]
    and decide whether you need migration . If you need migration then have a look at,
    [http://arjudba.blogspot.com/2009/03/difference-between-we8mswin1252-and.html|http://arjudba.blogspot.com/2009/03/difference-between-we8mswin1252-and.html]
    [http://arjudba.blogspot.com/2009/03/difference-between-we8iso8859p1-and.html|http://arjudba.blogspot.com/2009/03/difference-between-we8iso8859p1-and.html]
    [http://arjudba.blogspot.com/2009/03/difference-between-we8iso8859p1-and_11.html|http://arjudba.blogspot.com/2009/03/difference-between-we8iso8859p1-and_11.html]
    And always check for reports in csscan.
    Edited by: user9533551 on 07-Jul-2009 04:29

  • Checking for letters and numbers

    Guys, i need to check a String to see if contains either letters or numbers and nothing else. I know that there's certain function is could use like:
    1. isNum() - to check for numbers
    2. isChar()-to check for letters
    but the things is that i get error when i tried to use either 1 of these methods.
    So is there any other methods i could use to do this validation??
    Thx Guys

    Ooo.. i saw that 2 method too but it says that it onli accept character but not string and wat i wan to check is a String.

Maybe you are looking for

  • Alternative ways to load Flash website

    Hello, I have created a fully Flash website and as I continue to add images to my swf file obviously it is taking longer to load the site. I think I have created a pretty slick and straight forward preloader, but as I continue to add images to my sit

  • ISE guestaccess - Android/iPad problem

    Hi all, I have a guestaccess using CWA on ISE 1.1.1 and WLC 7.2 The setup is realy simple with redirect ACL to ISE and after that an permit-all ACL. Guest users are on a guest vlan and go thru a ASA to talk to DHCP, DNS and ISE. When I try to connect

  • ESS: Room Booking in MySAP ERP 2004

    Hi All, I am creating Room Booking service. I dont find any standard link in ESS. Has anyone created Room Booking in MySAP ERP 2004. Is any workflow attached with this service. Can PP30 transaction serve the purpose.. I dont the correct functionality

  • Answer to my own question.

    This was a silly problem. The passwd command needs 2 parameters - the local and remote domains. In this case.... passwd TDOM1 TDOM2

  • Incorrect Padding

    When I try to login to Leopard Wiki using WebKit it gives me a "Error from server: Incorrect padding (8002)" message. Other browsers work fine. Any ideas why this might be and if it can be fixed?