Convert Hexadecimal NCRs to unicode characters

I have Hexadecimal NCRs in comments while importing comments from the 3b2 application. How can this be converted to appropriate characters using acrobat javascript.
For example: The comment contains (&#x000D) which should be converted to the appropriate unicode character. 

I may be wrong, but I think you would use String.fromCharCode to convert a UCS-2 code into a string. So you then have to parse your string to process any escapes in it, and call that method.

Similar Messages

  • Java UDF help: Hexadecimal to Chinese Unicode converison

    Hi Experts,
    can someone help me in a design solution to convert Hexadecimal Values to Chinese Characters while sending the data to receiver system.
    I am not able to get any methods in Java to do the conversion.
    Help is appreciated.
    Regards,
    Prakash.

    Hi Grzegorz Glowacki,
    I am sorry this is not working :(.
    Sample input: 4E2D56FD     -->basically this hexavalues are chinese character representation.
    Output for it: ?????????
    +for verification:open Wordpad-->copy the hexcode >select 4chars at a time> hit <altx> and you will get corresponding conversion value.++
    String result = new String();
    try {
      byte[] bytes = new byte[input.length()/4];
        for (int i = 0; i < input.length()/4; i++) {
          byte value = Integer.valueOf(input.substring(i*4,i*4+4), 16).byteValue();
          bytes<i> = new Byte( value );    *//Byte cannot be stored in byte*
        result = new String(bytes, "UTF-16");
    catch (UnsupportedEncodingException e){}
    return result;
    Also this is PI7.0 system. please do help.
    thanks in advance.
    Regards,
    Prakash.
    Edited by: senthilprakash selvaraj on Feb 2, 2012 9:38 AM

  • Converting a hexadecimal string to ASCII-characters.

    I have long hexadecimal strings that I wish to convert to their corresponding ascii-characters. I know there are a series of functions for doing things like this - hex to number, number to string etc.
    At the moment, however, I am stuck at entering the hexadecimal string. I connect it to "hexadecimal string to number". What I get out is the decimal value of the two last digits of the hexadecimal number. No other wires are connected to the function. This means data is lost. How do I get around this? Is this particular function at all suitable for what I am trying to do?

    Hi Tzench,
    "hexadecimal string" isn't very accurate and conversion questions have been discussed many times before...
    See example on conversion of two different "hexadecimal" strings. There are other conversion methods, but those are most easiest to understand
    Message Edited by GerdW on 12-08-2008 11:27 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    HexString_LV71.vi ‏35 KB

  • Alogrithm for converting Unicode characters to EBCDIC

    I would like to know if there is any algorithm for converting Unicode Characters to EBCDIC.
    Awaiting your replys
    Thanks in advance,
    Ravi

    I would like to know if there is any algorithm for
    converting Unicode Characters to EBCDIC.Isn't ECBDIC a 7-bit code like ASCII. Unicode is
    16-bit. This means there is no way Unicode can be
    mapped on ECBDIC without loss of information. Link to
    Unicode,
    No. That is like saying that since UTF-8 is 8 bit based then it can't be mapped to UTF-16. But it does.
    EBCDIC either directly supports or has versions which support multibyte character sets. A multibyte character set can encode any fixed format sized character set. The basic idea is the same way UTF-8 works.
    Multibyte character sets have the added benifit that most of the data in the world is from the ASCII character set and the encodings always support that using only 8 bits. Thus the memory savings over UTF-16 (or UTF-32) are significant.

  • After Effects error: could not convert Unicode characters. (23 :: 46)

    Hello,
    I'm getting the following error message:
    After Effects error: could not convert Unicode characters. (23 :: 46)
    I have yet to find an answer that works to resolve this problem. I'm using CS6 on an HP Z220 on Windows 7.
    Thanks in advance.

    So I solved the problem. A little history for this situation: I created a new AE project and while attempting to import a file received the error message:  After Effects error: could not convert Unicode characters. (23 :: 46)
    I then tried to import a Vanishing Point which broken the spell on the error message and allowed the menu to select a vanishing point to appear. I closed out of that and was then able to import files.

  • AE error: Could not convert Unicode Characters

    Hey guys,
    I purchased the Video Copliot Action essentials 2 (720p). Whenever I try to import or drag and drop the pre-keyed clips (quicktime .mov format) into AE, I get the After Effects error: could not convert Unicode Characters (23 ::46) . I found an article online that said to make changes to the text in whatever Im importing, but umm it's a video, not text.
    I am using AE cs5.
    I can import the clips just fine into Premier Pro and export them oddly enough in Quicktime format just fine, however I lose the transperency "pre-keyed" , that's somehow embedded into the original video, therefore I now have a video of smoke, but with a non removable black background.
    Please help! thanks!

    Hey man i made an account just to reply to this, i had the same error come up while i was importing video files so i had a look around and found that it had something to do with the language/coding not being recognised, so i looked closer into the footage and tried different method of importing the file and later realised that after effects didnt recognise some of the characters in the file path way, the original folder was created using a macbook, windows recognises the language but after effects didnt, so i moved the file to my desktop and tried to import it again and presto it worked fine, you may not have the same problem but i thought just incase you do, you should try moving the file,
    if not heres a thread for the error:
    http://helpx.adobe.com/after-effects/kb/error-could-convert-unicode-characters.html
    hope that could be of some help.
    Zai

  • " could not convert Unicode characters (23::46) "

    I am suddently received an error message: " could not convert Unicode characters (23::46) " on my OS X version 10.9, when I trying to open a template. I have no problem to open the file on my friend's pc tho..  Any suggestion how to fix it greatly appreciated.
    Thanks,
    Andy,

    There is some character in the file name or the path name for the file that After Effects doesn't recognize. What is the full path and file name of this project?

  • After Effects error: could not convert Unicode characters. (23::46) CS6

    Hello I just created a project in AE CC and wanted to save also a version for CS6.
    All went ok but when I tried to open the project in CS6 I received the following error:
    "After Effects error: could not convert Unicode characters. (23::46)"
    Does anyone know what that means and how to fix it?

    After Effects CC is much, much better at handling characters that are outside of the character set used by the OS at its current language settings. So, file names and paths (and other strings) that work fine in After Effects CC and later may fail with earlier versions.
    For example, if you are running your OS and applications in English and have Chinese characters in your file names, After Effects CS6 and earlier will fail, but After Effects CC and earlier will succeed.

  • Convert Unicode characters to ASCII

    Hi,
    I need to convert few Unicode characters in a text file to ASCII ..Pls help help to get a java program to convert the few Unicode characters and output to a different text file with Ascii .

    No idea i just did google search hope this might help you
    public class UnicodeCast {
      public static void main(String[] args) {
        // Simple arithmetic on chars - VERY BAD for internationalization!
        System.out.println("'a' + 1 = " + (char) ('a' + 1));
        // Truncate characters by casting to byte (16-bit to 8-bit casting)
        char yen = '\u00a5'; // Japanese Yen
        char aeAcute = '\u01FC'; // Roman AE with acute accent
        System.out.println("Yen as byte: " + (byte) yen);
        System.out.println("AE' as byte: " + (byte) aeAcute);
        System.out.println("Yen as byte to char: " + (char) (byte) yen);
        System.out.println("AE' as byte to char: " + (char) (byte) aeAcute);
        // Convert ints to chars
        int iYen = 0xa5;
        int iaeAcute = 0x01fc;
        System.out.println("Yen from int = " + (char) iYen);
        System.out.println("AE' from int = " + (char) iaeAcute);
    }

  • Direct Execution of query having Unicode Characters

    Direct Execution of query having Unicode Characters
    Hi All,
    In my application I am firing a Select Query having Unicode characters in Where Clause under condition like '%%'
    to Oracle 10g DB from a Interface written in VC6.0...
    Application funcationality is working fine for ANSI characters and getting the result of Select properly.
    But in case of Unicode Characters in VC it says 'No Data Found'.
    I know where the exact problem is in my code. But not getting the exact solution for resolving my issue...
    Here with I am adding my code snippet with the comments of what i understand and what i want to understand...
    DBPROCESS Structure used in the functions,_
    typedef struct
    HENV hEnv;
    HDBC hDbc;
    HSTMT hStmt;
    char CmdBuff[[8192]];
    char RpcParamName[[255]];
    SQLINTEGER SpRetVal;
    SQLINTEGER ColIndPtr[[255]];
    SQLINTEGER ParamIndPtr[[255]];
    SQLPOINTER pOutputParam;
    SQLUSMALLINT CurrentParamNo;
    SQLUSMALLINT OutputParamNo;
    SQLUSMALLINT InputParamCtr;
    SQLINTEGER BatchStmtNo;
    SQLINTEGER CmdBuffLen;
    short CurrentStmtType;
    SQLRETURN LastStmtRetcode;
    SQLCHAR SqlState[[10]];
    int ShowDebug;
    SQLCHAR* ParameterValuePtr;
    int ColumnSize;
    DBTYPE DatabaseType;
    DRVTYPE OdbcDriverType;
    BLOCKBIND *ptrBlockBind;
    } DBPROCESS;
    BOOL CDynamicPickList::GetResultSet(DBPROCESS *pDBProc, bstrt& pQuery, short pNumOdbcBindParams, COdbcBindParameter pOdbcBindParams[], CQueryResultSet& pQueryResultSet)
         int               lRetVal,
                        lNumRows;
         bstrt               lResultSet;
         wchar_t               lColName[[256]];     
         SQLUINTEGER          lColSize;
         SQLSMALLINT          lColNameLen,
                        lColDataType,
                        lColNullable,
                        lColDecDigits,                         
                        lNumResultCols;
         wchar_t               lResultRow[[32]][[256]];
    OdbcCmdW(pDBProc, (wchar_t *)pQuery); *//Query is perfectly fine till this point all the Unicode Characters are preserved...*
         if ( OdbcSqlExec(pDBProc) != SUCCEED )
              LogAppError(L"Error In Executing Query %s", (wchar_t *)pQuery);          
              return FALSE;
    Function OdbcCmdW_
    //From this point have no idea what is exactly happening to the Unicode Characters...
    //Actually i have try printing the query that gets stored in CmdBuff... it show junk for Unicode Characters...
    //CmdBuff is the Char type Variable and hence must be showing junk for Unicode data
    //I have also try printing the HexaDecimal of the query... I m not getting the proper output... But till i Understand, I think the HexaDecimal Value is perfect & preserved
    //After the execution of this function the call goes to OdbcSqlExec where actual execution of qurey takes place on DB
    SQLRETURN OdbcCmdW( DBPROCESS p_ptr_dbproc, WCHAR      p_sql_command )
         char *p_sql_commandMBCS;
         int l_ret_val;
         int l_size = wcslen(p_sql_command);
         int l_org_length,
    l_newcmd_length;
    p_sql_commandMBCS = (char *)calloc(sizeof(char) * MAX_CMD_BUFF,1);
    l_ret_val = WideCharToMultiByte(
                        CP_UTF8,
                        NULL,                         // performance and mapping flags
                        p_sql_command,          // wide-character string
                        -1,                         // number of chars in string
                        (LPSTR)p_sql_commandMBCS,// buffer for new string
                        MAX_CMD_BUFF,                    // size of buffer
                        NULL, // default for unmappable chars
                        NULL // set when default char used
    l_org_length = p_ptr_dbproc->CmdBuffLen;
    l_newcmd_length = strlen(p_sql_commandMBCS);
    p_ptr_dbproc->CmdBuff[[l_org_length]] = '\0';
    if( l_org_length )
    l_org_length++;
    if( (l_org_length + l_newcmd_length) >= MAX_CMD_BUFF )
    if( l_org_length == 0 )
    OdbcReuseStmtHandle( p_ptr_dbproc );
    else
    strcat(p_ptr_dbproc->CmdBuff, " ");
         l_org_length +=2;
    strcat(p_ptr_dbproc->CmdBuff, p_sql_commandMBCS);
    p_ptr_dbproc->CmdBuffLen = l_org_length + l_newcmd_length;
    if (p_sql_commandMBCS != NULL)
         free(p_sql_commandMBCS);
    return( SUCCEED );
    Function OdbcSqlExec_
    //SQLExecDirect Requires data of Unsigned Char type. Thus the above process is valid...
    //But i am not getting what is the exact problem...
    SQLRETURN OdbcSqlExec( DBPROCESS *p_ptr_dbproc )
    SQLRETURN l_ret_val;
    SQLINTEGER l_db_error_code=0;
         int     i,l_occur = 1;
         char     *token_list[[50]][[2]] =
    {     /*"to_date(","convert(datetime,",
                                       "'yyyy-mm-dd hh24:mi:ss'","1",*/
                                       "nvl","isnull" ,
                                       "to_number(","convert(int,",
                                       /*"to_char(","convert(char,",*/
                                       /*"'yyyymmdd'","112",
                                       "'hh24miss'","108",*/
                                       "sysdate",     "getdate()",
                                       "format_date", "dbo.format_date",
                                       "format_amount", "dbo.format_amount",
                                       "to_char","dbo.to_char",
                                       "to_date", "dbo.to_date",
                                       "unique","distinct",
                                       "\0","\0"};
    char          *l_qry_lwr;  
    l_qry_lwr = (char *)calloc(sizeof(char) * (MAX_CMD_BUFF), 1);
    l_ret_val = SQLExecDirect( p_ptr_dbproc->hStmt,
    (SQLCHAR *)p_ptr_dbproc->CmdBuff,
    SQL_NTS );
    switch( l_ret_val )
    case SQL_SUCCESS :
    case SQL_NO_DATA :
    ClearCmdBuff( p_ptr_dbproc );
    p_ptr_dbproc->LastStmtRetcode = l_ret_val;
    if (l_qry_lwr != NULL)
         free(l_qry_lwr);
    return( SUCCEED );
    case SQL_NEED_DATA :
    case SQL_ERROR :
    case SQL_SUCCESS_WITH_INFO :
    case SQL_STILL_EXECUTING :
    case SQL_INVALID_HANDLE :
    I do not see much issue in the code... The process flow is quite valid...
    But now i am not getting whether,
    1) storing the string in CmdBuff is creating issue
    2) SQLExecDirect si creating an issue(and some other function can be used here)...
    3) Odbc Driver creating an issue and want some Client Setting to be done(though i have tried doing some permutation combination)...
    Any kind of help would be appreciated,
    Thanks & Regards,
    Pratik
    Edited by: prats on Feb 27, 2009 12:57 PM

    Hey Sergiusz,
    You were bang on target...
    Though it took some time for me to resolve the issue...
    to use SQLExecDirectW I need my query in SQLWCHAR *, which is stored in char * in my case...
    So i converted the incoming query using MultibyteToWideChar Conversion with CodePage as CP_UTF8 and
    then passed it on to SQLExecDirectW...
    It solved my problem
    Thanks,
    Pratik...
    Edited by: prats on Mar 3, 2009 2:41 PM

  • Insert Unicode Characters Into Oracle 8.1.5

    Hello,
    First off, here are the specs:
    Oracle 8.1.5
    JDK 1.2.1
    Oracle8i 8.1.6.2.0 JDBC Drivers for use with JDK 1.2.x for Solaris
    I'm running into a problem with insert Unicode characters into Oracle via the JDBC driver. As you can see above, I am using the Oracle 8.1.6.2.0 JDBC driver because it is the first driver with supports the JDK 1.2.x. So I think I should be okay.
    I can retrieve data with special characters from Oracle by calling the getBytes() method from the ResultSet with all special characters being intact. I am using getBytes because calling getString() would throw the following exception: "java.sql.SQLException(): Fail to convert between UTF8 and UCS2: failUTF8Conv". However, with that value that I just retrieved, or any other data with special characters (unicode) in which I try to insert into Oracle does not get converted properly.
    What appears to be happening is that data with special characters (unicode), are not being treated as a single double byte character, but rather two single byte characters. Thus, R|ckschlagventil becomes RC<ckschlagventil once it is inserted. (Hopefully, my example will be rendered properly).
    According to all documentation that I have found, the JDBC driver should not have any problem with converting UCS2 Java Strings to Oracle's UTF8 character set.
    I have set Oracle's NLS_NCHAR_CHARACTERSET to UTF8. I am also setting the environment variable NLS_LANG to AMERICAN_AMERICA.UTF8. Perhaps there is some other environment setting in which I am missing?
    Any help would be appreciated,
    Christian
    null

    Import has a lot of options, so it depends on what you want to do.
    C:\> imp help=y
    will show you all possible options. An example of full import :
    C:\> imp <username>/<password>@<TNS alias> file=<DMP file> full=y log=<LOG file>
    Message was edited by:
    Paul M.
    ...and there is always [url http://download-uk.oracle.com/docs/cd/F49540_01/DOC/index.htm]The documentation

  • Converting hexadecimal XML data to a string

    Hello!
    Until now I generated XML data with the FM 'SDIXML_DOM_TO_XML'.
    After that I did a loop over the xml_as_table in which I was casting each line of that table to a string.
    ASSIGN <line> TO <line_c> CASTING.
    After the inftroduction of unicode in our system I get a error:
    In the current program an error occured when setting the field symbol <LINE_C> with ASSIGN or ASSIGNING (maybe in combination with the CASTING addition).
    When converting the base entry of the field symbol <LINE_C> (number in base table: 32776), it was found that the target type requests a memory alignment of 2
    What does it mean? Does somebody have a solution.
    I need this function for sending this XML data as string over a simple old CPIC connection.
    Best regards
    Martin

    Hello Martin
    Perhaps my sample report ZUS_SDN_XML_XSTRING_TO_STRING provides a solution for your problem.
    *& Report  ZUS_SDN_XML_XSTRING_TO_STRING
    *& Thread: Converting hexadecimal XML data to a string
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1029652"></a>
    REPORT  zus_sdn_xml_xstring_to_string.
    *-- data
    *-- read the XML document from the frontend machine
    TYPES: BEGIN OF xml_line,
            data(256) TYPE x,
          END OF xml_line.
    DATA: xml_table TYPE TABLE OF xml_line.
    DATA: go_xml_doc       TYPE REF TO cl_xml_document,
          gd_xml_string    TYPE string,
          gd_rc            TYPE i.
    PARAMETERS:
      p_file  TYPE localfile  DEFAULT 'C:payload_idoc.xml'.
    START-OF-SELECTION.
      CREATE OBJECT go_xml_doc.
      " Load XML file from PC and get XML itab
      CALL METHOD go_xml_doc->import_from_file
        EXPORTING
          filename = p_file
        RECEIVING
          retcode  = gd_rc.
      CALL METHOD go_xml_doc->get_as_table
        IMPORTING
          table   = xml_table
    *      size    =
    *      retcode =
    " NOTE: simulate creation of XML itab
      go_xml_doc->display( ).
      create object go_xml_doc.
      CALL METHOD go_xml_doc->parse_table
        EXPORTING
          table   = xml_table
    *      size    = 0
        receiving
          retcode = gd_rc.
      CALL METHOD go_xml_doc->render_2_string
    *    EXPORTING
    *      pretty_print = 'X'
        IMPORTING
          retcode      = gd_rc
          stream       = gd_xml_string
    *      size         =
      write: / gd_xml_string.
    END-OF-SELECTION.
    Regards
      Uwe

  • Is there a list of Unicode characters that can be used in Acrobat bookmarks?

    I can add Greek characters to Acrobat bookmarks using hexadecimal strings. For example, to print a lower case gamma symbol I use <FEFF03B3>. FEFF is the required Unicode flag and 03B3 is the Unicode code for gamma. This works fine. However, there are no Unicode entries for greek characters in the PDF 32000-1:2008 PDF Specification manual. Table D.2 - PDFDocEncoding Character Set on page 656 lists Unicode characters and these also work when added to bookmarks but no Greek codes are in this table. Since I can sucessfully use Greek Unicode characters in the range of 0x0391 - 0x03CE and these characters are not listed in the PDF manual I am assuming there are additional Unicode character that will work in bookmarks. Therefore, I am looking for a complete list of Unicode characters that can be used in Acrobat's bookmarks. Does such a list exist?

    Thank you for the response.
    I'm sorry to hear there is no list available. I'm building the Acrobat bookmarks automatically. The input data contains entity codings (for example, a lower case Greek gamma is coded as &#x03B3;) and I was hoping to be able to just pass these through with an automatic conversion to a hexadecimal string (for example <FEFF03B3>). If I had a list of valid Unicode characters, that will display in an Acrobat bookmark, I could validate each entity before the conversion and catch the ones that won't display correctly. I know these types of characters are out there because I have already come across them. For example, a superscript 5 (0x2075) displays fine in MSWord but shows as a white box in a bookmark. Now I'll need to proof the output PDFs and look for white boxes in the bookmarks so that I can build my list of unicode characters that do not work in Acrobat bookmarks.
    Again, thanks for your help.

  • Unicode characters not displayed in text property

    I am developing a web application with Flex Builder. I write
    the text for each label using a font called Dhivehi which is
    written from left to right, and then copy the text and paste it in
    the label property called text.
    However in the source code view the text property of the
    label shows
    text=""
    The issue is that when rendered the text is rversed. So I
    want to run a function once the application is loaded, to reverse
    the text in the label, so that the text will appear in it's
    original way.
    any help will be very much appreciated

    Hi,
    I have a strange problem here with Windows.Forms.RichTextBox, when I assign a .ToString() value of sting builder to a rich text box’s .Rtf Property the Unicode characters containing in string builder gets converted to ???? symbols in .Rtf property of rich
    text box.
    Could you please let me know if Rich text box’s .Rtf property can hold Unicode characters? or is there any other way to store the Unicode characters in rich text box?
    Thanks & Regards,
    Tabarak
    Hello,
    To clarify and help you get proper solution, I would recommend you share a rtf string or even a simple sample which could reproduce that issue with us.
    We will based on that sample to help you.
    Regards,
    Carl
    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.

  • Converting Hex string to unicode

    I am reading in a hex representation of Unicode characters as a string.(for example: 004100200042)
    I want to convert the string from hex to unicode, and write the corresponding characters to a file. The output should look like follow:
    A B (0041 = Capital A, 0020 = space, 0042 = Capital B)
    Could you please assist?

    Problem solved, no need to look into it. Thank you

Maybe you are looking for

  • I deleted the timeline. How do I get it back?

    I'm making a movie for a school project. I clicked a cross on the bar above the timeline, which I though was just to hide it, I've tried everything but I can't get it back. Any help would be greatly appreciated!! Need answers as soon as possible. Tha

  • Carrier sign still showing after wiping and reloading OS?

    Hello dear users, In my thread of "application installation issues", it seems to be determined that my carrier who I got the phone from, is blocking the install of applications as I get a 910 error, application authorization failure, when i try to in

  • Ironport size limit exceeded message

    Hi, Wondering if anyone can help, we have a limit on the size of emails allowed to be sent out as per normal and when users exceed this limit they receive an email response which appears to be generated by one of our exchange servers, should they be

  • Import from Excel - Lookup column

    Hi all, I would like to import an Excel spreadsheet to SharePoint list. One column in that spreadsheet should be lookup column which points to a column in another list in SharePoint. How could I do it? Thanks,

  • How to implement the security in web service with Weblogic 9.2

    I've generated web service by Web Logic 9.2 using existing WSDL (as per client requirement) and want to add security policy for authentications. I have used following annotation in service class. @Policies({ @Policy(uri="policy:Auth.xml" , direction=