Error converting XSTRING to STRING (unicode, codepage)

Hi all,
I have a problem converting data from an external file into SAP.
The file is uploaded via an application created in web dynpro, where I use the upload functionality. This returns the file in the XSTRING format, and  then use the following to convert (where l_xstring is the file and l_string is how I want the file):
  l_string TYPE string,
  l_xstring TYPE xstring,
  convt = cl_abap_conv_in_ce=>create( input = l_xstring ).
  convt->read( IMPORTING data = l_string ).
This worked perfectly - until I recieved a file containing russian characters
The SAP system (BI) is in Unicode, so this should be ok.
I get a:
CONVT_CODEPAGE
CX_SY_CONVERSION_CODEPAGE
Error, when trying to run it.
Also the following migth be helpful:
At the conversion of a text from codepage '4110' to codepage '4102':
- a character was found that cannot be displayed in one of the two
codepages;
- or it was detected that this conversion is not supported
The running ABAP program 'CL_ABAP_CONV_IN_CE============CP' had to be
terminated as the conversion
would have produced incorrect data.
The number of characters that could not be displayed (and therefore not
be converted), is 18141. If this number is 0, the second error case, as
mentioned above, has occurred.
I have tried setting the codepage parameter of the READ method, but to no success.
Anyone ??
-Tonni

Friend,
Call the FM like below....
CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
  EXPORTING
    IM_XSTRING        = x
   IM_ENCODING       = 'UTF-8'
IMPORTING
   EX_STRING         = x.

Similar Messages

  • Need a function module to convert xstring to string in web dynpro applicati

    hi,
       need a function module to convert xstring to string in web dynpro application other than HR_KR_XSTRING_TO_STRING.
    Moderator message: please (re)search yourself first.
    Edited by: Thomas Zloch on Nov 17, 2010 5:31 PM

    Hi,
    Check the following link:
    FM to convert XString to String
    Regards,
    Bhaskar

  • Convert XString to String and String to IWDResource

    Hi everybody,
    we want to open a PDF-Document from Backend in Web Dynpro. For the communication we use a Web Service.
    In Backend we have a PDF-Document with data type XSTRING.
    1. In Backend we convert the PDF-Document from XSTRING to STRING in order to send it via Web Service
    2. Then we call the Web Service and pass by the STRING param
    3. In Web Dynpro we convert the value from STRING to Bytes, like below:
    IWDResource resource = WDResourceFactory.createResource( myPDFStringFromWS.getBytes(), "Doc1", WDWebResourceType.PDF);
    4. We bind the Resource to a FileDownload-UI.
    Unfortunately we get the error message: Document is not a valid PDF
    How can we convert a String to IWDResource? Could the problem be in our first step, where we convert the XSTRING into STRING?
    regards,
    Sid

    Hello Sid,
    IWDResource resource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(wdContext.currentFileElement().getString()),"PDF",WDWebResourceType.PDF,true);
    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.toString(),"PDF");
    window.show();
    Can you try this and let us know.
    Regards
    Nizamudeen SM

  • Convert xstring to string

    Hi All,
    I need to convert the XSTRING to STRING and i need a FM or method which converts all the special characters like Å, ö, ä, å, ü as it is.
    Im getting the xstring value from excel sheet using file upload in WEB UI.
    The class used is CL_HTMLB_FILEUPLOAD and the attribute is FILE_CONTENT which is of type XSTRING.
    I have few special characters in the excel sheet which i need as string.
    I have modified this FM CRM_IC_XML_XSTRING2STRING to convert the Xstrin gto string... but stilll the replacement is not working.
    Can anyone suggest me...Any different solution i can use to get the file upload in string. Or get the characters from Xstring
    Useful answers are much apprieciated.
    Thanx in advance
    Siva.

    Hey,
    Why dont you check this method
    ECATT_CONV_STRING_TO_XSTRING. Not sure whether it supports special characters or not
    Regards,
    Vinay

  • Fm to convert XSTRING TO STRING in SRM 7.0

    HI All ,
                i have created a web dynpro application for Uploading excel . Now i am not getting any workaround to convert X STRING to STRING . In SAP there is a FM HR_KR_XSTRING_TO_STRING but its not there in SRM so when i tried to copy the same in SRM and try to convert its getting converted in Junk characters . Please help me out in this .
    Regards
    Shankar

    HI Nilema ,
                           I have tried ur code also but still the same result .
    METHOD onactionon_upload .
      TYPES :
          BEGIN OF str_itab,
          name(10) TYPE c,
          age(10) TYPE c,
          END OF str_itab.
      DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
             i_data TYPE STANDARD TABLE OF string,
             lo_nd_sflight TYPE REF TO if_wd_context_node,
             lo_el_sflight TYPE REF TO if_wd_context_element,
             l_string TYPE string,
             fs_table TYPE str_itab,
             l_xstring TYPE xstring,
             fields TYPE string_table,
             lv_field TYPE string,
             lv_codepage TYPE CPCODEPAGE.
      DATA : t_table TYPE if_main=>element_datatab,
             data_table TYPE if_main=>element_datatab.
    get single attribute
    break akedia.
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
    CALL FUNCTION 'SCP_CODEPAGE_BY_EXTERNAL_NAME'
      EXPORTING
        external_name       =  'ISO-8859-1'
       KIND                = 'H'
    IMPORTING
       SAP_CODEPAGE        = lv_codepage
    EXCEPTIONS
       NOT_FOUND           = 1
       OTHERS              = 2
    IF sy-subrc <> 0.
      lv_codepage = '1100'.
    ENDIF.
    CALL FUNCTION 'LXE_COMMON_XSTRING_TO_STRING'
      EXPORTING
        in_xstring        = l_xstring
       IN_CODEPAGE       = lv_codepage
      EX_CODEPAGE       = '0000'
      UNMASK_CRLF       = ''
    IMPORTING
       EX_STRING         = l_string
    EXCEPTIONS
       ERROR             = 1
       OTHERS            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.
        APPEND fs_table TO t_table1.
      ENDLOOP.
      lo_nd_sflight = wd_context->get_child_node( 'DATATAB' ).
      lo_nd_sflight->bind_table( t_table1 ).
    ENDMETHOD.

  • FM to convert XString to String

    I am developing an simple application to upload an excel file and display its contents in a table in Solution manager using Web dynpro.
    But 'HR_KR_XSTRING_TO_STRING' is not avaiable in DS1.
    Can you help me find a replacement for this function module.
    TYPES :
           BEGIN OF str_itab,
           name(10) TYPE c,
           age(10) TYPE c,
           END OF str_itab.
           DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
             i_data TYPE STANDARD TABLE OF string,
             lo_nd_sflight TYPE REF TO if_wd_context_node,
             lo_el_sflight TYPE REF TO if_wd_context_element,
             l_string TYPE char200,
             fs_table TYPE str_itab,
             l_xstring TYPE char200,
             fields TYPE string_table,
             lv_field TYPE string.
           DATA : t_table TYPE if_main=>elements_data_tab,
             data_table TYPE if_main=>elements_data_tab.
    get single attribute
             wd_context->get_attribute(
             EXPORTING      name =  `DATASOURCE`
               IMPORTING      value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.    READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.    READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.    APPEND fs_table TO t_table1.
      ENDLOOP.
      lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB' ).
      lo_nd_sflight->bind_table( t_table1 ).
    Thanks in advance
    Akshatha

    It is not appropriate to ask general ABAP questions such as this in the Web Dynpro ABAP Forum. As your punishment I will help with your question.
    In this sample buffer is the XSTRING, text_buffer is the string. You have to supply an encoding to tell the system what codepage/unicode type the XSTRING is.
    data: convin  type ref to cl_abap_conv_in_ce,
          call method cl_abap_conv_in_ce=>create
            exporting
               encoding    = encoding
               input       = buffer
            receiving
              conv        = convin.
          call method convin->read
            importing
              data = text_buffer.

  • Error converting a read string to type Double.

    I'm trying to read data stored in a text file, a mixture of strings and data.
    Using MyReader As New FileIO.TextFieldParser(source)
    Do
    intSampleCnt = intSampleCnt + 1
    strSample(intSampleCnt) = MyReader.ReadLine ' Reads a string like "filename.txt"
    dblOggLength(intSampleCnt) = CDbl(Val(MyReader.ReadLine)) ' <= Crash occurs here. Reads a number like 9.87654321
    ' additional code...
    Loop Until intSampleCnt = 10
    End Using
    Big problem: *I'm* not getting the error so I can't reproduce it. OTHER users are telling me they are getting the following error:
    System.InvalidCastException: Bringing the line "0.Au" to type "Double" is invalid. ---> System.FormatException: Input string had invalid
    format.
    No idea where "0.Au" is coming from. It's not in my file. Originally, I simply read the line and assigned it to the dblVariable (which worked for me). When users started reporting the error, I tried using:
    dblVar = CDbl(MyReader.ReadLine)
    When that failed, I tried:
    dblVar = CDbl(Val(MyReader.ReadLine))
    I must be on the wrong track. No idea why others are getting errors but not me. Any ideas? Thx.

    The first suggestion will set things up for you but you need to play with this
    Another suggestion is to place the culture code as the first line in the file i.e. to get the current culture code then change how data is written to the file
    System.Globalization.CultureInfo.CurrentCulture.Name
    Then read the file i.e
    Source text file
    fr-BE
    Somename 1 1000,56
    AnotherName 9,99
    Code
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim FileName As String = IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "France.txt")
    Dim style As NumberStyles = NumberStyles.Number Or NumberStyles.AllowDecimalPoint
    Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture(IO.File.ReadAllLines(FileName)(0))
    Dim number As Decimal
    Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(FileName)
    MyReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
    MyReader.Delimiters = New String() {vbTab}
    Dim currentRow As String()
    While Not MyReader.EndOfData
    Try
    currentRow = MyReader.ReadFields()
    If Not currentRow.Length = 1 Then
    If Decimal.TryParse(currentRow(1), style, culture, number) Then
    Console.WriteLine("Converted '{0}' to {1}", currentRow(1), number)
    Else
    Console.WriteLine("Unable to convert '{0}'", currentRow(1))
    End If
    End If
    Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
    ' You decide how to handle issues
    End Try
    End While
    End Using
    End Sub
    Results
    Converted '1000,56' to 1000.56
    Converted '9,99' to 9.99
    Detect Decimal separator
    System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Error converting XML to String

    I'm trying to use getXMLString() to put my XML document in a String variable. I get the following when I try to output the String:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: This object has been closed. If the close() was implicit, and you would like the object not to be closed between calls, see the keepCursorAlive() method</ERROR>
    If I just output the XML doc without putting it into a String variable it works fine.
    System.out.println(q.getXMLString()); //OK
    // get the XML document in string format
    String xmlString = q.getXMLString(); //NOT OK
    System.out.println(xmlString);
    What am I doing wrong? Any help would be great!
    Thanks,
    Melani

    Hi,
    SMUM_XML_PARSE is a simplified, unreleased and undocumented version of the powerful, released and documented iXML
    If you look at the GET_ELEMENT subroutine in that function module, you'll see that the nodes of type CO_NODE_CDATA_SECTION are simply ignored.
    The simpliest thing for you, maybe, is to duplicate the code of SMUM_XML_PARSE (as it is rather easy to handle), and add a section to GET_ELEMENT. You'll have also to use IF_IXML_CDATA_SECTION interface and ixml_iid_cdata_section constant.
    Documentation is here: [SAP Library: Interface if_ixml_cdata_section|http://help.sap.com/saphelp_nw70/helpdata/en/bb/576658dca511d4990b00508b6b8b11/frameset.htm ]
    Best regards,
    Sandra

  • Error synchroniz​ing with Windows 7 Contacts: "CRADSData​base ERROR (5211): There is an error converting Unicode string to or from code page string"

    CRADSDatabase ERROR (5211): There is an error converting Unicode string to or from code page string
    Device          Blackberry Z10
    Sw release  10.2.1.2977
    OS Version  10.2.1.3247
    The problem is known by Blackberry but they didn't make a little effort to solve this problem and they wonder why nobody buy Blackberry. I come from Android platform and I regret buying Blackberry: call problems(I sent it to service because the people that I was talking with couldn't hear me), jack problems (the headphones does not work; I will send it again to service). This synchronisation problem is "the drop that fills the glass". Please don't buy Blackberry any more.
    http://btsc.webapps.blackberry.com/btsc/viewdocume​nt.do?noCount=true&externalId=KB33098&sliceId=2&di​...

    This is a Windows registry issue, if you search the Web using these keywords:
    "how to fix craddatabase error 5211"       you will find a registry editor that syas it can fix this issue.

  • Convert from std::string to CString in UNICODE builds

    Actually I tried all ways but they didn't help me. 
    Is there any working code to convert from std::string to
    CString in UNICODE builds?
    Thanks.
    Mirjalal

    Using non-Unicode string literals in VC++ is asking for trouble, the exact result depends on the codepage of the system used to compile the program and the codepage of the system used to run the program. For example on my system I get 2 question
    marks instead of one, one for ş and one for ə.
    I also get to compilation warnings:
    warning C4566: character represented by universal-character-name '\u015F' cannot be represented in the current code page (1252)
    warning C4566: character represented by universal-character-name '\u0259' cannot be represented in the current code page (1252)
    The easiest solution is to use Unicode string literals and std::wstring:
    wstring z = L"nüşabə";
    CString cs(z.c_str());
    nameData.SetWindowTextW(cs);
    If you can't do that things will get complicated. If you need help with this please give more information. Knowing the compiler version and the system codepage would be useful.

  • Gdk-WARNING **: Error converting from UTF-8 to STRING

    I just installed Arch64 few days ago. In my old setup I was used to work with 2 softwares: Eclipse CDT and WingIDE.
    I tried to start these applications (they require java and python but they are binary releases) locally and I get this errors which I can't solve by myself googling... Reporting snapshots of my desktop too.
    [j_zar@Surprise eclipse]$ ./eclipse
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: Impossibile aprire il convertitore da "UTF-8" a "ISO-8859-1"
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: Failed to load Pango module '/usr/lib/pango/1.6.0/modules/pango-basic-fc.so' for id 'BasicScriptEngineFc'
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: pango_shape called with bad font, expect ugly output
    (eclipse:7864): Pango-WARNING **: pango_font_get_glyph_extents called with null font argument, expect ugly output
    (eclipse:7864): Pango-WARNING **: pango_font_get_metrics called with null font argument, expect ugly output
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Pango-WARNING **: pango_cairo_font_get_scaled_font called with bad font, expect ugly output
    [j_zar@Surprise wingide]$ ./wing
    (wing.py:7922): Gdk-WARNING **: Error converting from UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1'
    (wing.py:7922): Gdk-WARNING **: Error converting from UTF-8 to STRING: Conversion from character set 'UTF-8' to 'ISO-8859-1' is not supported
    Anybody can help in this???
    Last edited by J_Zar (2007-10-30 11:48:28)

    There has been talk about adding these config files, that fixes this kinda problems, to a separate pkg with a helper script you run 32bit programs with.
    for quick fix
    Link
    Grab the 3 pango files, throw them somewhere, edit pangorc to corresponding paths for the 2 other files.
    Start program with
    export PANGO_RC_FILE="/path/to/pangorc"
    program
    for the string error, if its iconv
    export GCONV_PATH=/opt/lib32/usr/lib/gconv
    to previous command
    Note, you cant start 64bit programs that use pango/iconv from the terminal you exported the variable.

  • Xstring to string for ms_excel

    Hi ALL,
    I am using OFFICE CONTROL UI ELEMENT for displaying iternal table data into EXCEL  OFFICE CONTROL UI .
    i am displaying data into OFFICE CONTROL UI EXCEL, then i will update excel of office control and then i will save,when i save that updated data need to send one internal table .
    DATA :OUT_STRING1 TYPE STRING,
          CONTENTXMLSOURCE TYPE XSTRING.
    WD_CONTEXT->GET_ATTRIBUTE( EXPORTING NAME = 'DATAS' IMPORTING VALUE = CONTENTXMLSOURCE ).
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
      EXPORTING
      FROM_CODEPAGE       = '8500'
        IN_XSTRING          = CONTENTXMLSOURCE
      OUT_LEN             =
    IMPORTING
       OUT_STRING          = OUT_STRING1.
    data lr_conv       type ref to cl_abap_conv_in_ce.
    lr_conv = cl_abap_conv_in_ce=>create( ).
    lr_conv->convert( exporting input = xstring importing data = string ).
    NOT FOR LIKE Excel file (like Tab Delimited, CVS, XML, etc). Only for ms_excel.
    the above mention two concepts are not working to convert from xstring to string ,is there any concept ms_excel format xstring to string?
    THANKS,
    RAMA
    Edited by: Ramakullay Challa on Sep 25, 2009 2:03 PM
    Edited by: Ramakullay Challa on Sep 25, 2009 2:06 PM

    Hi Lekha,
    When i am activating one  method , insede this method i am calling one c lass.
    data: DATASOURCE type ref to CL_WD_OFFICE_CONTROL,
       content type xstring.
    TRY.
          DATASOURCE = cl_wd_office_control=>GET_DATA_SOURCE( VALUE = CONTENT ).
    CATCH CX_WD_ACF_EXCEPTION.
    ENDTRY.
    error .any idea lekha.
    *you can use only use "class=>method" with static methos.*
    data: DATASOURCE type ref to CL_WD_OFFICE_CONTROL,
       content type xstring.
    CONTENT  = DATASOURCE->GET_DATA_SOURCE( ).
    no error.
    thanks.
    thanks,
    rama
    Edited by: Ramakullay Challa on Sep 28, 2009 7:08 AM
    Edited by: Ramakullay Challa on Sep 28, 2009 7:09 AM
    Edited by: Ramakullay Challa on Sep 28, 2009 11:26 AM

  • How to store text in AD attributes of type String(Unicode)

    In our company, we store the name of the building in which an employee works in one of the ActiveDirectory attributes named extensionAttribute# where # represents a number form 1-15.  I want to be able to store the names of buildings in the AD
    attribute named "buildingName". According to the
    buildingName attribute in the MSDN library, the syntax is "String(Unicode)".
    When I try something that seems simple to write some text into this attribute such as
    Set-QADUser jdoe -ObjectAttributes @{buildingName="My Building Name"}
    I get an error that says "Set-QADUser : The requested operation did not satisfy one or more constraints associated with the class of the object."
    I have been searching forums and code libraries for a solution to this issue, but I do not understand why I can't store string data into this attribute. I did try the following code snippets to try to convert the string to Unicode (and UTF-8) before I wrote
    to the buildingNameAttribute, but I still get the same error.
    $text = "My Building Name"
    $enc = [System.Text.Encoding]::Unicode
    # $enc = [System.Text.Encoding]::UTF8
    $encText = $enc.GetBytes($text)
    $encText
    Set-QADUser jdoe -ObjectAttributes @{buildingName=$encText}
    Has anyone else had this issue or know how to overcome it? I can, of course, continue to use the extensionAttribute in which I currently have the data stored, but I really want to free it up and use the "buildingName" attribute.
    Gardner Rowe Systems Analyst III UT MD Anderson Cancer Center - Making Cancer History

    From your link:
    buildingName attribute
    The name of the building where an organization or organizational unit is based.
    IOW, it is an attribute of organization or organizational unit class of object not a user object, so you can't set it for a user.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • 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

  • Converting Base64 encoded String to String object

    Hi,
    Description:
    I have a Base64 encoded string and I am using this API for it,
    [ http://ws.apache.org/axis/java/apiDocs/org/apache/axis/encoding/Base64.html]
    I am simply trying to convert it to a String object.
    Problem:
    When I try and write the String, ( which is xml ) as a XMLType to a oracle 9i database I am getting a "Cannot map Unicode to Oracle character." The root problem is because of the conversion of the base64 encoded string to a String object. I noticed that some weird square characters show up at the start of the string after i convert it. It seems like I am not properly converting to a String object. If i change the value of the variable on the fly and delete these little characters at the start, I don't get the uni code error. Just looking for a second thought on this.
    Code: Converting Base64 Encoded String to String object
    public String decodeToString( String base64String )
        byte[] decodedByteArray = Base64.decode( base64String );
        String decodedString = new String( decodedByteArray, "UTF-8");
    }Any suggestions?

    To answer bigdaddy's question and clairfy a bit more:
    Constraints:
    1. Using a integrated 3rd party software that expects a Base64 encoded String and sends back a encoded base64 String.
    2. Using JSF
    3. Oracle 10g database and storing in a XMLType column.
    Steps in process.
    1. I submit my base64 encoded String to this 3rd party software.
    2. The tool takes the encoded string and renders a output that works correctly. The XML can be modified dynamically using this tool.
    3. I have a button that is binded to my jsf backing bean. When that button is clicked, the 3rd party tool sets a backing bean string value with the Base64 String representing the updated XML.
    4. On the backend in my jsf backing bean, i attempt to decode it to string value to store in the oracle database as a XML type. Upon converting the byte[] array to a String, i get this conversion issue.
    Possibly what is happen is that the tool is sending me a different encoding that is not UTF-8. I thought maybe there was a better way of doing the decoding that i wasn't looking at. I will proceed down that path and look at the possibility that the tool is sending back a different encoding then what it should. I was just looking for input on doing the byte[] decoding.
    Thanks for the input though.
    Edited by: haju on Apr 9, 2009 8:41 AM

Maybe you are looking for