Problems with Unicode webapplication

Hi,
I am developping a small webapplication which is supposed to support Unicode (different characters such as �S�\ etc.).
I have a simple form which calls a JSP page.
The JSP page prints the recieved parameter and prints it to the WEB browser.
The JSP page also prints the parameter to a file.
If I use:
     String textIn= request.getParameter("unicodeText");
     byte d[]=new byte[textIn.length()];
     textIn.getBytes(0, textIn.length(), d, 0);
     String unicodeText = (new String(d,"UTF-8"));Everything works fine but if I use:
     byte[] bytes = request.getParameter("unicodeText").getBytes();
     String unicodeText= new String(bytes, "UTF-8");OR:
     byte[] bytes = request.getParameter("unicodeText").getBytes("UTF-8");
     String unicodeText= new String(bytes, "UTF-8");OR:
     byte[] bytes = request.getParameter("unicodeText").getBytes("UTF-8");
     String unicodeText= new String(bytes);The parameter retrieved by the JSP page contains strange characters (such as a box followed by a questionmark) when I submit for example '�\' and '�S'.
The problem is that the method:
getBytes(0, textIn.length(), d, 0);used in the working example is Deprecated. In the API documentation I am told that the getBytes()
Deprecated. This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the the getBytes() method, which uses the platform's default charset.
I really do not know why I can not get it to work!
/Fredrik

Ha again,
I installed resin and started it with the default
configuration and changed my jsp file as follows:
byte[] bytes =
request.getParameter("unicodeText").getBytes("UTF-8");
String unicodeText= new String(bytes, "UTF-8");
What you are doing is unnecessary (but should still work). Instead, simply write:
String unicodeText = request.getParameter("unicodeText");as the unicode string has already been decoded by the jsp container.
and this gives the wanted result (i.e. it works).
I have tried around 20 chineese characters and �
� and �.
There is only one small thing... all combinations of
� � and � works except
��� in this order.Really? I have tried the same character sequence (with your above code, and with my simplified version) and both work. Here is my test page:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page session="false" %>
<html>
<head>
  <title>Test encodings</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<br />
<br />
Request parameters:<br />
<%
   java.util.Map params = request.getParameterMap();
   for (java.util.Iterator i = params.keySet().iterator(); i.hasNext(); ) {
     String param = (String) i.next();
     String[] values = request.getParameterValues(param);
     out.write("<b>" + param + "=[</b>");
     for (int j = 0; j < values.length; j++) {
       if (j > 0) {
         out.write("<b>,</b>");
       out.write(values[j]);
     out.write("<b>]</b> ");
%>
<body bgcolor="#ffffff" text="#000000"
  link="#006699" vlink="#006699" alink="#006699" leftmargin="0" topmargin="0"
  marginheight="0" marginwidth="0">
  <table border="0" align="left">
   <tr><th colspan="2">Enter some values</th></tr>
   <form method="post"
    action="testenc2.jsp"
    <%-- enctype="multipart/form-data" --%>
    >
    <input type="hidden" name="hidden" value="hidden_val" />
    <tr>
     <td>name</td>
     <td>
      <input type="text" name="name" size="50" maxlength="100"/></td>
    </tr>
    <tr>
     <td>address</td>
     <td>
      <input type="text" name="address" size="15" maxlength="20"/>
     </td>
    </tr>
    <tr>
     <td colspan="2">
     <input type="submit" name="cmd" value="send" />
     <input type="submit" name="cmd" value="cancel" />
     </td>
    </tr>
   </form>
  </table>
</body>
</html>>
Anyway, this is a minor problem.
Now I have to figure out why it works with resin but
nor with jakarta.tomcat....Doesn't tomcat have a mailing list? That's probably a good place to ask or search.

Similar Messages

  • Problem with unicode in MIME text/html

    Hi;
    I have a java program that sends email by sending it to our exchange server using SMTP. The email has both a To and a Bcc in the single email sent.
    The bcc addressee receives the email fine.
    The to address however has a problem with chars that are > 0x7f in the html. The html uses utf-8. But the displayed characters look as though the utf-8 part was ignored.
    Also weird, if I go to view, options in Outlook for the bcc email (which is good) it shows:
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
    boundary="----=_Part_0_32437168.1135634913407"
    Return-Path: [email protected]
    X-OriginalArrivalTime: 26 Dec 2005 22:08:33.0366 (UTC) FILETIME=[E94D1F60:01C60A68]
    ------=_Part_0_32437168.1135634913407
    Content-Type: text/plain; charset=Cp1252
    Content-Transfer-Encoding: quoted-printable
    ------=_Part_0_32437168.1135634913407
    Content-Type: text/html; charset=Cp1252
    Content-Transfer-Encoding: quoted-printable
    ------=_Part_0_32437168.1135634913407--
    But for the to email (which has the problem), it only shows:
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
    boundary="----=_Part_0_32437168.1135634913407"
    Return-Path: [email protected]
    X-OriginalArrivalTime: 26 Dec 2005 22:08:33.0366 (UTC) FILETIME=[E94D1F60:01C60A68]
    Does javamail do anything weird when it gets an email with a to and a bcc and split it up wrong? I just download and installed the latest mail.jar and activation.jar.
    thanks - dave

    OK...this didnt quite cure it for me...but having done this AND then this...
    MimeBodyPart htmlText = new MimeBodyPart();
    final String htmlStuff = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
    + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
    + "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"
    + "<head>"
    + "<title>Stuff.</title>"
    + "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=utf-8\"/>"
    + "</head><body>"
    + "<p>Currency Symbols: \u00A3\u00A2\u20A3\u20AC$<p>"
    + "</body></html>";
    DataSource htmlSource = new DataSource()
    private String stuff = htmlStuff;
    private Charset cset = Charset.forName("utf-8");
    public String getContentType() { return "text/html"; };
    public java.io.InputStream getInputStream() throws IOException
    return new ByteArrayInputStream(cset.encode(stuff).array());
    public String getName()
    return null;
    public OutputStream getOutputStream() throws IOException
    throw new IOException();
    htmlText.setDataHandler(new DataHandler(htmlSource));
    htmlText.addHeader("Content-Transfer-Encoding","base64");
    This works for me as shown by the Unicode chars in the html.
    If you intend to take this to production create a decent external DataHandler class and avoid the use of the anonymous class - which then avoids the need for the final String and the string can come from anywhere then.
    Hope this helps,
    Barry

  • MaxDB upgrade/heterogeneus system copy problem with unicode conversion

    Project goal:
    upgrade a Content Server Version 7.3.0.35   32bit Non Unicode to
    version 7.6.06.16   64bit Unicode
    I found and followed note 962019
    My plan (following the note): 
    -create a clone of the original Content Server (vmware clone)
    -as per note 962019 patched server 7.3.0.35 to 7.3.0.62 (> 7.3.0.57)
    -created index
    -on a fresh installed windows 2003 server 64bit i installed Content Server with build 7.6.06.16
    -using loadercli from the target server (7.6.06.16) exported data
    Now i was ready to start the import, as the note states:
    "if the database parameter _UNICODE is set to the value NO and you want to start the target system with SAP MaxDB Version 7.6, you can use procedure described here for the import into a target system only with SAP MaxDB Version 7.6.05 build 11 or higher"
    Having version 7.6.06.16 i was confident on such procedure, but my import stops immediatly with error:
    D:\exportKpro>loadercli -d PRD -u SAPR3,SAP -b import.sql
    Loader protocol: 'C:\Documents and Settings\administrator\My Documents
    \sdb\loader\log\loader.log'
    Loader packages: 'C:\Documents and Settings\administrator\My Documents
    \sdb\loader\packages'
    Error connecting user SAPR3 to database PRD on local host: -25005
    User (SAPR3) logon to database PRD failed: SQL error -8046 = Conversion from UNI
    CODE impossible: 7600 (error position: 1)
    And now i'm stuck with no hints on how to proceed.
    Thanks in advance.
    Regards
    Simone Zaffalon

    Hello Simone,
    as you're staying on Windows platform, there is no need for a heterogenous system copy.
    All you've to do is to upgrade the 32-Bit installation to your target release (why not use MaxDB 7.7 right away?).
    Once this is done, you can check whether the database catalog is still non-unicode (_UNICODE=FALSE).
    If it is, there is a catalog migration procedure you can use to change this.
    If the 32-Bit database is as you want it, take a full data backup.
    Then uninstall the 32-Bit software, install the same version of MaxDB in the 64-Bit fashion.
    Finally create the db instance by a restore of the backup.
    After a load_systab your database is fully ready to go!
    Just to stress this again: the _UNICODE parameter is not about your data!.
    It's about the database catalog.
    Having this parameter set to YES you can create e.g. tables named with Unicode characters.
    The parameter does in no way affect your business data!
    Since many customers ask why they should't use loadercli for a scenario like this:
    a) It's only supported if you must use it, that is, you change the byte-order of the OS platform
    b) it's way faster than export and import. We're talking about a few hours compared to days here!
    c) It's much safer and controllable to use backup/restore and SDBUPD and move on step-by-step than exporting all data into a big file chunk and hoping that everything will be fine afterwards.
    regards,
    Lars

  • Problems with Unicode in extending JCo with JNI/librfc

    Hello,
    Problem:
    We are using JCo for communication with a SAP-System. We have an extension written in C using JNI for handling callbacks. Let's call it cb.dll.
    This extension is not unicode enabled. Now we have to connect to an unicode SAP-System. We do it with JCo, so the connection is in unicode mode. The result is, that our cb.dll does not work.
    If you want to enable the dll to handle unicode, the last step beside reengineering the C-code, is to link it against the librfc32u.dll.
    But then the communication in the cb.dll with SAP does not work, because the initial connection was made with JCo an JCo is using librfc32.dll. The cb.dll uses the RFC-handle from JCo.
    Question:
    How communicates JCo with a unicode SAP-System using librfc32 (non unicode) ?
    How can I use this method for our own dll ?
    thanks in advance

    The current settings are
    select * from nls_database_parameters
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET UTF8
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.1.0.3.0
    20 rows selected
    I use NVARCHAR2 as Datatype.
    My problem is as follows ...
    I use the oracle Table as external Data Table in Access. When I copy a russian text from an Access Table in the oracle Table I see only ??????. In the Access Table I see the correct russian text.

  • FONT problems with UNICODE - URGENT

    i'm trying to present text in different languages, like english, greek or cyrillic and so on. i want to work with the Arial Unicode MS font, that is installed on my system and which DOES appear in the getAvailableFonts() list!!!
    But when i try to display a greek text i see not all glyphs correctly. What have i to do??
    Have I still to set up my font.properties file and if so how can i manage this
    thanx a lot

    To me, it looks as if your problem is that you're only calling setFont on "this".
    That's only going to set it for the top level frame, and doesn't always do it for every individual component. The easy way to get around this is to go berserk with the setFont call. Set it on anything (heck, set it on your dog if it makes you feel any better)! ;D
    The slightly harder but smarter way to do this is to write a recursive function that drills down your component list.
    public void setFontRecursively(Font myFont, Component comp) {
       comp.setFont(myFont);
       if (comp instanceof Container) {
          Component[] childComps = ((Container)comp).getComponents();
          if (childComps != null) {
             for (int i=0; i < childComps.length; i++) {
                setFontRecursively(myFont, childComps);
    That should basically cover anything bar popup menus and drop-down submenus. You have to recall this as they appear, or they don't get the font straight off.
    Hope that helps!
    Martin Hughes

  • Urdu subtitles (problems with Unicode)

    I have a major problem where I have a number of subtitle documents in Word with the text in Urdu. I can save these documents as Unicode txt files and they seem to be okay. However, when I import into Encore the subtitles look different (they still look like some kind of Arabic text but different). I've gone round in circles over this and have run out of ideas!!

    In that case it may be worth to test
    Lemony Subtitler
    to prepare the bitmaps (and the script). The Lemony site says that it has
    "Full Unicode support. With support for vertical and right-to-left scripts, ligatures, etc."

  • Problem with Unicode and Oracle NCLOB fields

    When I try to INSERT a new (N)CLOB into an Oracle database, all is fine until I use a non-ASCII character, such as an accented roman letter, like the "�" (that's '\u00E9') in "caf�" or the Euro Currency symbol "?" (that's '\u20AC' as a Java character literal, just in case the display is corrupted here too). This doesn't happen with "setString", but does happen when streaming characters to the CLOB; however, as Oracle or the driver refuse strings larger than 4000 characters, and as I need to support all the above symbols (and many more), I'm stuck.
    Here's the background to the problem (I've tried to be detailed, after a lot of looking around on the web, I've seen lots of people with similar problems, but no solutions: I've seen and been able to stream ASCII clobs, or add small NCHAR strings, but not stream NCLOBs...).
    I'm using Oracle 9.2.0.1.0 with the "thin" JDBC driver, on a Windows box (XP Pro). My database instance is set up with AL32UTF8 as the database encoding, and UTF8 as the national character set.. I've created a simple user/schema, called LOBTEST, in which I created two tables (see below).
    The basic problems are :
    - with Oracle and JDBC, you can't set the value of a CLOB or NCLOB with PreparedStatement's setString or setCharacterStream methods (as it throws an exception when you send more than 4000 characters)
    - with Oracle, you can only have one LONG VARCHAR-type field per table (according to their documentation) and you MUST read all columns in a set order (amongst other limitations).
    - with a SQL INSERT command, there's no way to set the value of a parameter that's a CLOB (implementations of the CLOB interface can only be obtained by performing a SELECT.... but obviously, when I'm inserting, the record doesn't exist yet...). Workarounds include (possibly) JDBC 4 (doesn't exist yet...) or doing the following Oracle-specific stuff :
    INSERT INTO MyTable (theID,theCLOB) VALUES (1, empty_clob());
    SELECT * FROM MyTable WHERE theId = 1;
    ...and getting the empty CLOB back (via a ResultSet), and populating it. I have a very large application, that's deployed for many of our customers using SapDB and MySQL without a hitch, with "one-step" INSERTS; I can't feasibly change the application into "three-step INSERT-SELECT-UPDATE" just for Oracle, and I shouldn't need to!!!
    The final workaround is to use Oracle-specific classes, described in:
    http://download-east.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdbc-javadoc/index.html
    ...such as CLOB (see my example). This works fine until I add some non-ASCII characters, at which point, irrespective of whether the CLOB data is 2 characters or 2 million characters, it throws the same exception:
    java.io.IOException: Il n'y a plus de donn?es ? lire dans le socket
         at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
         at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
         at oracle.jdbc.driver.OracleClobWriter.flush(OracleClobWriter.java:204)
         at scratchpad.InsertOracleClobExample.main(InsertOracleClobExample.java:61)...where the error message in English is "No more data to read from socket". I need the Oracle-specific "setFormOfUse" method to force it to correctly use the encoding of the NCLOB field, without it, even plain ASCII data is rejected with an exception indicating that the character set is inappropriate. With a plain CLOB, I don't need it, but the plain CLOB refuses my non-ASCII data anyway.
    So, many many thanks in advance for any advice. The remainder of my post includes my code example and a simple SQL script to create the table(s). You can mess around with the source code to test various combinations.
    Thanks,
    Chris B.
    CREATE TABLE NCLOBTEST (
         ID         INTEGER NOT NULL,
         SOMESTRING NCLOB,
         PRIMARY KEY (ID)
    CREATE TABLE CLOBTEST (
         ID         INTEGER NOT NULL,
         SOMESTRING CLOB,
         PRIMARY KEY (ID)
    package scratchpad;
    import java.io.Writer;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.util.Properties;
    import oracle.jdbc.driver.OracleDriver;
    import oracle.jdbc.driver.OraclePreparedStatement;
    import oracle.sql.CLOB;
    public class InsertOracleClobExample
         public static void main(String[] args)
              Properties jdbcProperties = new Properties();
              jdbcProperties.setProperty( "user", "LOBTEST" );
              jdbcProperties.setProperty( "password", "LOBTEST" );
    //          jdbcProperties.setProperty("oracle.jdbc.defaultNChar","true");
              Driver jdbcDriver = new OracleDriver();
              PreparedStatement pstmt = null;
              Connection connection = null;
              String tableName = "NCLOBTEST";
              CLOB clob = null;
              try
                   connection = jdbcDriver.connect("jdbc:oracle:thin:@terre:1521:orcl", jdbcProperties);
                   pstmt = connection.prepareStatement("DELETE FROM NCLOBTEST");
                   pstmt.executeUpdate();
                   pstmt.close();
                   pstmt = connection.prepareStatement(
                        "INSERT INTO "+tableName+" (ID,SOMESTRING) VALUES (?,?);"
                   clob = CLOB.createTemporary(pstmt.getConnection(), true, CLOB.DURATION_SESSION);
                   clob.open(CLOB.MODE_READWRITE);
                   Writer clobWriter = clob.getCharacterOutputStream();
                   clobWriter.write("Caf? 4,90? TTC");
                   clobWriter.flush();
                   clobWriter.close();
                   clob.close();
                   OraclePreparedStatement opstmt = (OraclePreparedStatement)pstmt;
                   opstmt.setInt(1,1);
                   opstmt.setFormOfUse(2, OraclePreparedStatement.FORM_NCHAR);
                   opstmt.setCLOB(2, clob);
                   System.err.println("Rows affected: "+opstmt.executeUpdate());
              catch (Exception sqlex)
                   sqlex.printStackTrace();
                   try     {
                        clob.freeTemporary();
                   } catch (SQLException e) {
                        System.err.println("Cannot free temporary CLOB: "+e.getMessage());
              try { pstmt.close(); } catch(SQLException sqlex) {}
              try { connection.close(); } catch(SQLException sqlex) {}
    }

    The solution to this is to use a third-party driver. Oranxo works really well.
    - Chris

  • Problem with unicode in 80GB Classic

    I listen to a lot of foreign bands and artists, mainly Japanese bands. I recently changed some of the artists' names to unicode, in order to separate them from the Non-Japanese bands on the last.fm site. Everything looks fine in iTunes when I view them, but when I go to look at the list of artists in my iPod, I have some artist names listed multiple times, some with the new unicode writing, others the regular font. I have checked for trailing spaces, etc., but I still get the same result. Does the iPod not support unicode, or is there something I can do to fix this?

    I got it fixed now. I just had to make sure that all the songs also had the album artist in unicode.

  • Help Me Plz Problem With Unicode

    Hi All
    Please Help :
    I am beginner in Java , my problem is when I use TextField and use it to enter word in language differ from English , then put the entered text in String and try to write it in another textField it appears in another strange language ....
    Also this problem when writing the string to the DataBase (SQL Server 2000)...

    Based on what you are provided are you sure your Cable Modem is plugged in to the "INTERNET" port on your router?  It appears as though you have it plugged into a regular switch port and are still getting DHCP from your ISP. 

  • Problem with charsets for foreign languages

    hi
    i have a problem with a webapplication
    in my webapplication i have some code that gets data from a webpage of another webapplication. This other web application can use many foreign languages
    the problem is that those foreign languages contain some special characters, and those special chars aren't displayed the right way
    this is the code to get the data from the other webapp
    private static StringBuffer getContent(String sUrl) throws MalformedURLException, IOException  {
            StringBuffer content = new StringBuffer();
            URL url = new URL(sUrl);
            HttpURLConnection httpURLConn = (HttpURLConnection) url.openConnection();
            httpURLConn.setRequestProperty("charset", "utf-8");
            BufferedReader buffReader = new BufferedReader(new InputStreamReader(httpURLConn.getInputStream()));
            String inputLine;
            while ((inputLine = buffReader.readLine()) != null) {
                content.append("\n" + inputLine);
            return content;
        }as you see , i tried to set the encoding to UTF-8 but that did not solve the problem

    an example of those special chars
    fran�aisis displayed as
    code]
    fran��ais

  • I have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

  • Problem with running multiple servlet in same webapplication with tomcat 3

    Hi all,
    I am using Tomcat 3.0 as webserver with jdk1.3, Servlet 2.0,
    Templates for html file and oracle 8i on UNIX platform.
    I have problem with multiple servlet running same webapplication.
    There are two servlet used in my application. 1) GenServlet.class
                   and 2) ServletForPrinting.class
    All of my pages go through GenServlet.class which reads some property files
    and add header and footer in all pages.
    I want reports without header & footer that is not possible through GenServlet in my application.
    So I have used another servlet called ServletForPrinting --- just for reading html file.
    It is as follow:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ServletForPrinting extends HttpServlet {
    public void service (HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
    // set content-type header before accessing the Writer
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    File f1 = null;
    String report = null;
    String path = request.getPathInfo();
    try{
    String p = "/var/home/latif/proj/webapps/WEB-INF/classes" + path;
    System.out.println(p);
    f1 = new File(p);
    p = null;
    if (f1.exists()) {
    FileReader fr = new FileReader(f1);
    BufferedReader br = new BufferedReader(fr);
    report = new String();
    while ((report = br.readLine()) != null) {
    out.println(report);
    }catch(Exception e) {
    out.close();
    report = null;
    path = null;
    f1 = null;
    } // end class
    It works fine and display report properly.
    But now Problem is that if report is refreshed many times subsequently,
    WebServer will not take any new change in any of java file used in web-application.
    It works with the previous class only and not with updated one.
    Then I need to touch it. As soon as I touch it, webserver will take updated class file.
    Anybody has any idea regarding these situation?
    Is there any bug in my ServletForPrinting.java ?
    Any solution ????? Please suggest me.
    Suggestion from all are invited. That will help me a lot.
    Thanks in advance
    Deepalee.

    Llisas wrote:
    I solved the problem, I just had to wire the blocks in a sequential way (I still don't know why, but it works).
    Feel free to delete this topic.
    I would strongly suggest at least reading this tutorial to give you an idea of why your fix worked (or maybe only appeared to work).  Myself, I never just throw up my hands and say, "Whatever," and wash my hands of the situation without trying my best to understand just what fixed it.  Guranteed you'll run into the same/similar problem and this time your fix won't work.
    Please do yourself a favor and try to understand why it is working now, and save yourself (or more likely, the next poor dev to work on this project) some heartache.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Problem with field-symbols in UNICODE conversion

    Hi all.
    I'm in a UNICODE conversion project and I have a problem with a program that uses field-symbols.
    DATA: BEGIN OF wa_data_aux,
            mandt LIKE zindices-mandt,
            kschl LIKE zindices-kschl,
            datab LIKE zindices-datab,
            valor LIKE zindices-valor,
            descripcion LIKE zindices-descripcion,
            ernam LIKE zindices-ernam,
            erdat LIKE zindices-erdat,
            waers LIKE zindices-waers,
          END OF wa_data_aux.
    FIELD-SYMBOLS:
                   <fs2>  TYPE ANY,
                   <fs3>  LIKE wa_data_aux.
              <fs2> = <fs3>.
    This assignment results in a DUMP.
    Can anybody help me to solve this problem?
    Thanks!!

    TYPES: BEGIN OF wa_data_aux,
              mandt TYPE mandt,
              kschl TYPE kschl,
              erdat TYPE d,
              waers TYPE waers,
          END OF wa_data_aux.
    DATA: w_aux TYPE wa_data_aux.
    FIELD-SYMBOLS:
    <fs2> TYPE ANY,
    <fs3> TYPE wa_data_aux.
    w_aux-mandt = '300'.
    ASSIGN w_aux TO <fs3>.
    ASSIGN <fs3> TO <fs2>.
    WRITE : / <fs2>.
    GBY.

  • Problem when compiling C program from RFC SDK with Unicode on AIX 5.3

    hi friends.
    I try RFC with UNICODE.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90313271-2311-2a10-c495-c20199d1d821
    This simple code compiled.
    #include <saprfc.h>
    #include <sapuc.h>
    #include <sapucx.h>
    int mainU(int argc, SAP_UC* argv[] )
        const SAP_UC* s1 = cU("Hello");
        SAP_UC s2[100];
        strcpyU( s2, s1);
        printfU(cU("%s
    "),s2);
        return 0;
    The compiling command is
    cc -DSAPwithUNICODE -I ../rfcsdkU/include -L ../rfcsdkU/lib sample.c -o sample -lrfcu -lC
    to compile.
    Then the error information comed:
    "sample.c", line 7.24: 1506-045 (S) Undeclared identifier U16LIT_cU.
    "sample.c", line 7.27: 1506-275 (S) Unexpected text string literal encountered.
    "sample.c", line 10.16: 1506-276 (S) Syntax error: possible missing ')'?
    I hope someone can tell me how I can get it through.
    Edited by: sakamoto shouichi on Apr 16, 2008 11:02 AM
    Edited by: sakamoto shouichi on Apr 16, 2008 11:03 AM

    hi friends. I'm having same problem.
    i speak english just a little.sorry.
    see this command line.
    AIX5.3
    cc -I ../rfcsdk/include -L ../saprfc/rfcsdk/lib sapinfo.c -o sapinfo -lrfc -lC
    add -lC .
    i fnish this problem. thnx!
    Edited by: sakamoto shouichi on Apr 7, 2008 5:32 AM

  • Problem with syntaxes and structures in unicode

    1. i have a problem with syntax
    this is old syntaxes
    TRANSLATE c ...FROM CODE PAGE g1 ... TO CODE PAGE g2
    new systems should use this class instead of above
    CL_ABAP_CONV_IN_CE
    it reads data from a container and converts it to the system format.
    my old syntax is TRANSLATE header-id FROM CODE PAGE file_tab-codepage.
    i need to change to new one by using above class how to do it
    2. I have a structure are_buffer and i am working on upgrade of a old report , i have used a sap predefined structure callled arc_buffer from se11, now when i am using offset in one of the perform statement like
    PERFORM read_file USING handle_tab_wa-offset record_len
    CHANGING arc_buffer(record_len)
    error_handling
    p_message.
    but the system throws a error called ''the structure arc_buffer(record_length) does not start with character-type field''.
    i cannot change the structure becoz its sap standard structure .
    how to get out of this.

    Moderator message - Cross post locked
    Rob

Maybe you are looking for

  • IT_FIELDCATALOG IS NOT GETTING FILLED

    HI friends   I have returned a program for workflow tracking. Am getting the output has led light alone no data's are displayed. I found that my IT_FIELDCATALOG = GT_FCAT is not getting filled. How to fill that. Am pasting my programming here. Kinldy

  • Plz Help : Error in installing Apex

    Hi all, I have Oracle Apps 11.5.9 installed on my machine and linked it with Apex 2.2.1 version. But when i tried to open it using IE i am getting this error: Forbidden You don't have permission to access /pls/apex/apex on this server Oracle HTTP Ser

  • Customize back button in alv

    Hi, I created a custom refresh button in alv. However when user clicks on this, it opens the refreshed data in a new window. When i click on back, it takes me to the previous window having my original data. I want that it should take me to the main s

  • HT4356 The ipad2 working fine with AirPrint. Now the print centre says printing but nothing happens. Anyway to fix this ?

    The AirPrint from ipad2 to hp printer was working fine. All of a sudden the function no longer works! The ipad2 recognises the printer and even sends the print command. The printer centre say 'printing' but it remains syptuck in that position and no

  • FCoE options for Cisco UCS and Compellent SAN

    Hi, We have a Dell Compellent SAN storage with iSCSI and FCoE module in pre-production environment. It is connected to new Cisco UCS infrastructure (5108 Chassis with 2208IOM + B200 M2 Blades + 6248 Fabric Interconnect) via 10G iSCSI module (FCoE mod