Special characters in a javascript string...

Hey folks, in the javascript project I'm working on, there's a requirement that an SOH character (start of header, #1 in the ASCII character set) be included in a string. Does anybody know how that character can be inserted in a javascript string? Thanks in advance.

Thanks to both of you for your good advice. One last question: the project that I'm working on involves exporting the contents of an Adobe InCopy CS2 document to a text file. Before the export occurs, I insert a line that starts with ACSII character 1 and ends with ASCII character 2 , at the top of the file. This tells a subsequent process how and where to push the file. The export is working as it should. However, the ACSII control characters are not exported with the text file. Any thoughts on how, or if, this possible?

Similar Messages

  • German Special Characters in XSTRING to STRING conversion

    Hi Experts,
    I have a CSV file (created from a Windows Excel file) with German Special Characters (e.g. 'ä', 'Ä') and I am trying to read this into ABAP internal tables. By using the THTMLB tag 'thtmlb:fileUpload' I get an XSTRING and I am trying to convert this into STRING. However, wheny trying to do this I get an exception 'CX_SY_CONVERSION_CODEPAGE'.
    This is my coding:
      data: conv   type ref to cl_abap_conv_in_ce.
      conv = cl_abap_conv_in_ce=>create( input = lr_upload->file_content ).
      conv->read( importing data = lv_content ).
    Note: lr_upload is my XSTRING object from the file upload, lv_content is a STRING.
    In the CSV file the German special characters look fine and the SAP system is a Unicode system, but it seems like there are some problems with the conversions somehow. Any ideas from the experts?
    Thanks a lot and Regards,
    Jens

    As you mention a csv file I'm wondering if your encoding is wrong: I.e. when you create your instance of cl_abap_conv_in_ce you don't specify the encoding of your source hex string, so that means the default encoding is used, which should be UTF-8 in your case. So if your csv file is not encoded in UTF-8, specify the correct encoding in the create method and see if that helps.
    Depending on how you get the file contents you might actually be able to combine the file retrieval with the conversion in one step. E.g. if the file is read from the application server you could specify the used code page via [open dataset ... in legacy text mode ... code page|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_MODE.htm#&ABAP_ALTERNATIVE_4@4@]. Similarly method gui_upload of class cl_gui_frontend_services also allows you to specify a code page.
    If all of this doesn't help, post some further details on your file (e.g. sample content & encoding) and possibly add some further details from the exception you're getting. As you mention a Unicode system it basically means that we should be able to convert all characters without any problem as long as we specify the correct source code page.
    Cheers, harald

  • How can I display special characters of NonEuropean languages (French, Italian, Spanish, German and Portuguese.) using import string mechanism

    I would like to translate the User Interface of my application to French, Italian, Spanish, German and Portuguese.
    When I put special characters in the import string file they showed up as ? (question mark)
    The import strings file includes the following parameters for each string: font, text, size and style. (but no field for script)
    In order to use a unicode font such as Arial I need to select a french script. But this option is not supported bu LabView (As far as I saw)
    A) Is there a font which is directly German/ French etc and not regula font + script parameter?
    B) Are there another required step
    s for special characters support? (When I put speciual characters in the import string file the showed up as ? question mark)

    This was discussed last week in this group- read the previous messages.
    Look for the thread "Foreign Languages in Labview"
    And recite the mantra
    ActiveX is good
    ActiveX is holy
    All Hail Bill
    Those who claim otherwise are heretics and not to be trusted
    Actually, in this case the non-ActiveX suggestions may be good.
    talia wrote in message
    news:[email protected]..
    > How can I display special characters of NonEuropean languages (French,
    > Italian, Spanish, German and Portuguese.) using import string
    > mechanism

  • Use of special characters in Search String

    What is the use of special charaters like
    in the search string in the Find & Replace of ABAP editor ?
    I want to search for all strings starting with V which are followed by alphabets like
    VA
    VB...
    If I use V*, it also gives me results like
    V/R...
    Whether it is possible to specify such a condition?

    Hi,
    While giving ur search in FIND & REPLACE,
    use the match case or match whole word only..
    Then u will get search results only where the exact case of that variable is used..
    As per my knowledge there is no signification of special characters ,- : ; in the search string..
    Hope this helps...
    Cheers,
    Simha.

  • Check whether there is any Special Characters in a String ?

    Hi All,
    I am having a very large String. I like to know how to check whether there is any special characters present in a string
    Thanks,
    J.Kathir

    I am having a very large String. I like to
    I like to know how to check whether there is any
    special characters present in a stringAll characters are special in a way. You shouldn't just single a few out because they don't look "normal" to you. Maybe they have golden hearts?

  • How can I find special characters in a string

    Hi,
    I have a small task where I have to find special characters in a given string, Can anyone suggest.......................

    What is your definition of a "special character", could you be a bit more specific?
    Do you simply want to find the position of a specific character in the string?
    Can it occur more than once and you want to find all occurences?
    What should happen if the special character does not exist?
    For programming purposes, all 256 possible 8 bit characters (x00-xFF) can be treated the same. Non-printing characters can be entered in \-codes or hex display if needed.
    LabVIEW Champion . Do more with less code and in less time .

  • Check special characters in a string

    Hi all
    I am using oracle 10g.......
    Need to know what should be the query to check whether a special character exists or not in a column value....used the following query like.....
    select count(*) into emp_no_count_special_char
    from dual
    where REGEXP_LIKE(insert_data_rec.emp_no , '[#!$^&*%./\|]$' )
    or REGEXP_LIKE(insert_data_rec.emp_no , '^[#!$^&*%./\|]' );
    This works fine in case a string starts or ends with a special character ,what if a string of special characters lies in between numeric digits.
    e.g: '100#$%7'
    Please help find a query that checks for the existence of sp. characters irrespective of their position in the column!!!
    Thanks
    Dave
    Edited by: Dave on Jun 6, 2012 5:17 AM
    Edited by: Dave on Jun 6, 2012 5:18 AM

    Hi Dave,
    example below:
    -- Check that at least one special character exists in the string
    SELECT COUNT (*)
      INTO emp_no_count_special_char
      FROM DUAL
    WHERE REGEXP_LIKE (insert_data_rec.emp_no, '[#!$^&*%./\|]');
    -- Check that no special characters exist in the string
    SELECT COUNT (*)
      INTO emp_no_count_special_char
      FROM DUAL
    WHERE NOT REGEXP_LIKE (insert_data_rec.emp_no, '[#!$^&*%./\|]');
    {code}
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Convert HTML special characters to String

    Hi,
    I'm looking for an easy way to convert HTML special characters (like "&#246") to String.
    Any Ideas how implement this? Thanks

    Hi,
    I'm looking for an easy way to convert HTML special
    characters (like "�") to String.
    Any Ideas how implement this? Thankswell im assuming that you mean that when you are working with java you will be getting a ? instead of the character you want. assuming that you are reading and writing to this html file. if not well maybe this can stil help : BufferedReader inFile = new BufferedReader(new InputStreamReader(new FileInputStream(fileName),"ISO8859-1"));
    PrintWriter outFile = new PrintWriter(new OutputStreamWriter(new FileOutputStream(fileName2), "ISO8859-1")); basically you need to make sure that ou define ISO8859-1 as the encoding.

  • Oracle BPM Studio 10g R3 cataloging Web Services strips special characters

    Hi folks,
    I have a Web Service that I'd like to invoke from an activity in my process.
    When I catalog the WSDL, BPM Studio creates the associated External Resource just fine except for one small problem, namely all Simple Types that have 'special characters' in their enumerated String values are stripped clean.
    Example 1:
    ADSL1
    ADSL2
    ADSL2+
    --> The plus is stripped from ADSL2+, causing BPM Studio to flag two problems caused by duplicate 'ADSL' values
    Example 2:
    adsl1#foo/123
    --> Everything to the left of 123 is stripped leaving only '123' as a value
    In fact in the BPM Studio's Editor, the only special character that is allowed is the underscore. Everything else e.g. \ # etc etc cannot be keyed in.
    Has anyone come across this before? Thanks for reading :-)
    cheers
    jm

  • Error of Special Characters in Export to Excel

    Hi,
    I guess the error you are getting is a Parser error. To solve this problem, before putting the data on the XML file, you have to pass the data through an encoding process. For UTF-8 the code for encoding should be something like.
      public java.lang.String encodeSpecialChar( java.lang.String attributeValue )
        //@@begin encodeSpecialChar()
              //Created By : AVIK SANYAL Date : 28 March 2008.
              //          Check for special characters like "&" in the String.
              //      replace "&" with "&"
              //      Returns the new encoded String.
              try {
                   if (attributeValue != null) {
                        attributeValue = attributeValue.replaceAll("&", "&");
                        attributeValue = attributeValue.replaceAll("<", ""&lt;"");// this is & lt
                        attributeValue = attributeValue.replaceAll(">", ""&gt;"");//this is & gt
                   } else {
              } catch (Exception ex) {
                   //          wdComponentAPI.getMessageManager().reportException(
                   //               "Failed to convert the character.",
                   //               true);
              //Returns the encoded String.
              return attributeValue;
        //@@end
    Try this and let me know if this works. The reason is that in Binary Cache method, the data is passed in an XML format and the MS-Excel application reads this to show it in the spreadsheet. The characters '&', '<' and '>' can cause failure in reading from this file.
    Thank You
    Avik
    Edited by: AVIK SANYAL on Sep 12, 2008 10:45 AM

    OK....!!!!!
    just download the Excel file (*.xls) and try open with Word-MS. In the document search by the string that you have mentioned in the question. (Use Ctrl +F).
    If you see something like "ABC bla bla ba & instead of  &amp ,  then you have to pass the data through the code I've mentioned.
    You can get more details on encoding special characters UTF-8 in Google.com or Sun Websites etc.
    You can also encode the & in hexadecimal format to get the desired output.

  • Remove all the special characters using java.util.regex

    Hi,
    How to remove the all the special characters in a String[] using regex, i have the following:-
    public class RegExpTest {
         private static String removeSplCharactersForNumber(String[] number) {
              String number= null;
              Matcher m = null;
                   Pattern p = Pattern.compile("\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\_\\+\\-\\{\\}\\|\\;\\\\\\'////\\,\\.\\?\\<\\>\\[\\]");
                   for (int i = 0; i < number.length; i++) {
                   m = p.matcher(number);
                   if (m.find()) {
                        number= m.replaceAll("");
                   System.out.println("Final Number is:::"+number);
                   return number;
              public static void main(String args[]){
                   String[] str = {"raghav!@#$%^&*()_+"};
                   RegExpTest regExpTest = new RegExpTest();
                   regExpTest.removeSplCharactersForNumber(str);
    This code is not working and m.find() is "false", here i want the output to be raghav for the entered string array, not only that it should remove all the special characters for a entered string[]. Is there a simple way to do this to remove all the special characters for a given string[]? More importantly the "spaces" (treated as a spl. character), should be removed as well. Please do provide a solution to this.
    Thanks

    You don't need the find(). Just use the replaceAll() on each element of the String[] i.e.
    String[] values = ...
    for (int i = 0; i < values.length; i++)
        values[i] = p.matcher(values).replaceAll("");
    }I can't understand your regex since the forum software has mangled it but you just need to add a space to the set of chars to remove. When you post code, surround it with CODE tags then the forum software won't mangle it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Special characters in XML structure when prepared using String

    Hi,
       I am preparing an XML structure using 'String'. I print the prepared XML structure in the server log. Issue is that I am seeing extra characters([[ and ]]) that I am not printing.
    Please let me know how to get rid of those.
    Code Excerpt
            String xmlHeader = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
            String lsb_xmlcon = xmlHeader;
            logger.info("ReqXMLString Process  1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("<REQUEST>");
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.2  --->" + lsb_xmlcon);
    Log
    ReqXMLString Process  1  ---><?xml version="1.0" encoding="utf-8" ?>
    ReqXMLString Process  1.1  ---><?xml version="1.0" encoding="utf-8" ?>[[
    ReqXMLString Process  1.2  ---><?xml version="1.0" encoding="utf-8" ?>[[
    <REQUEST>
    Thanks,
    Message was edited by: 996913
    This issue is observed only while running the code in server, not from Jdev.
    When we append the additional tags without new line character, "\n", there are no extra characters being added. Also, in other case also. where we used "Marshaller" to prepare the XML, we have seen this issue.
    After we set the below property to false, we got rid of the extra characters.
                            jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, false);
    Apparently the insertion of new line when the code runs on server(Weblogic 10.3.6.0) is creating the issue.
    Please let me know if anyone has come across a similar scenario.
    Thanks,

    I am building this XML in a servlet so ,right, DOM does process XML (even though a valid HTML file can be loaded into a DOM object) but if you build XML using DOM then write the XML out using PrintWriter and Transformer objects this will cause the XML to print out in your browser. If you view source on this XML you will see that the DOM object has translated all special characters to there &xxxx; equivalent. For a example: when the string (I know "cool" java) gets loaded into a attribute using the DOM object then wrote back out it looks like (I know &xxx;cool&xxx; java) if you view the source in your browser. This is what it should do, but the DOM object is not change the � to the "&xxxxx;". This servlet is acting as a gateway between a Java API and a windows asp. The asp will call the servlet expecting to get XML back and load it directly into a DOM object. When the windows DOM object gets the xml that I am returning in this servlet is throws a exception "invalid character" because the � was not translated to &xxxx; like the other characters were. According to the book HTML 4 in 24 hours (and other references) the eacute; or #233; are how you say "�" in HTML or XML. How do you say it?

  • How to Avoid Special Characters in string

    Hai.
    I want only Alphabets & Digits to be entered in to my string.No any other special characters except spaces.How can I do this? 
    Solved!
    Go to Solution.

    MikeS81 wrote:
    see the attached example.
    I would allow a few more, e.g. 0 and 8 to allow editing of the entered string (backspace, cursor buttons, delete key, etc.).
    Message Edited by altenbach on 11-21-2008 12:49 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    check_char_LV80MOD.vi ‏14 KB
    FilterStringInput.gif ‏6 KB

  • 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(',',' '));
    }

  • How to search special characters in a string

    Hi all,
    I want to search special characters in all string columns and all rows in the table.
    The table has about 5 string columns and about 5.000.000 rows. For each row and column, I have to search entries, which included special characters like ", !, ? or something else (f.ex. "Mama?Mia" or "!!!Hotel out of order!!!"). The problem, the character could stand at each position in the string.
    What's the best and most performance possibility to search such entries?? Is it possibility only by SQL; is there a special function for this?? Or must I use PL/SQL.
    Thanks for helping
    Dana

    HTH
    Laurent Schneider
    OCM DBA
    SQL> select * from z;
    S
    Mama?Mia
    a b c
    123
    SQL> select * from z where translate(s,'~ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz1234567890','~') is not null;
    S
    Mama?Mia
    SQL> select * from z where regexp_like(s, '[^[:alnum:][:space:]]');
    S
    Mama?Mia

Maybe you are looking for

  • LV 8.0 App Builder - Installer including NI-VISA

    Hallo, how can I include Ni VISA into the installer files with the LV 8.0 App Builder for using Visa functions? Kind regards Niko

  • Retrieving file from file port while idoc generation

    HI, we have set up the system to call IDOC_INBOUND_SINGLE from external system. it is working well through out. we have configured the file port in sap. If generation idoc is successfull, idoc number will be returned. if not execption will be thrown.

  • Bios tutrial

    Hello, I just finished building my new computer and seems to be running OK.  My MB is a KN8 neo4/SLI which I bought because the reviews I read said it had excellent upgrade capabilities (that was my number 1 priority).  I had some problems with the R

  • Uninstall and reinstall error 1 for Acrobat X

    I have been having problems with Acrobat for awhile, tried to copy over from my backup drive, tried to uninstall and reinstall but keep getting "Please uninstall and reinstall the product. If this problem still occurs please contact Adobe Technical s

  • ACS 4.2 - LDAP TCP Keepalive

    Hello I have an ACS 4.2.1.15 patch 3 and Novell Netware LDAP Server separated by a Firewall. The Firewall's default tcp session timeout is 3600 seconds. When no LDAP-Request is made for over one hour, the Firewall drops the connection from its table.