Forwarding with utf-8 encoding

Hi all,
I've been having a problem with UTF8 encoding with jdk1.3.
Here's three simple JSPs that illustrate it:
MattTest3.jsp
<%@ page contentType="text/html; charset=utf-8" %>
<form action=MattTest5.jsp>
<input type=text name=xxx>
<input type=submit>
</form>
<br>
<form action=MattTest4.jsp>
<input type=text name=xxx>
<input type=submit>
</form>
MattTest4.jsp
<%@ page contentType="text/html; charset=utf-8" %>
<jsp:forward page='MattTest5.jsp'/>
MattTest5.jsp
<%@ page contentType="text/html; charset=utf-8" %>
<%= request.getParameter("xxx") %>
The first MattTest3 renders two input boxes with submit buttons. The first input submits to MattTest5, which just prints the value from the request parameter. THe second submits to MattTest4, which does nothing other than forward to MattTest5.
If I enter "special characters", such as accented letters (e.g. hold AltGr and press a or e), then the first submission displays them as I entered them, and the second (with the forward) displays two question marks for each character entered.
I'm using iPlanet 4.1sp6 on Solaris 2.7, and only get the bahaviour with jdk1.3. Using jdk1.2, the request parameter gets truncated at the first "special character", which still isn't what I'd expect.
Does anybody have any ideas? Can anybody replicate the problem? On what platforms? Can anybody NOT replicate the problem? On what platforms?

try with java.net.URLEncoder.encode(parameter);
the following code may help:
import java.net.*;
public class CodificadorURL{
     public static void main(String []a){
               System.out.println(URLEncoder.encode("="));
               System.out.println(URLEncoder.encode("a"));
               System.out.println(URLEncoder.encode("�"));
               System.out.println(URLEncoder.encode("Amiga"));
               System.out.println(URLEncoder.encode("Sesi�n"));
}

Similar Messages

  • How to write csv or txt file through utl_file with UTF-8 Encoding

    Hi All,
    I need your help to write the data from DB to csv or txt file with UTF-8 encoding through utl_file.
    Database character set:AL32UTF8
    Database version:10G
    All the columns in the DB are of varchar2 type.
    Please let me know if there is any way of doing it.

    What was wrong with the info provided in the link(s) given?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions027.htm#SQLRF00620]

  • [SOLVED] Problems opening folders with UTF-8 encoded characters

    Hello everyone, I'm having an issue when I acess folders in all my programs ( except Dolphin File Manager). Every time I open the folder navigation window in my programs, folders with UTF-8 encoded characters ( such as "ç", "á ", "ó", "í", etc ) are not shown or the folder name not show these characters, therefore, I can not open documents inside these folders.
    However, as you saw, I can type these characters normally. Here's my "locale.conf" :
    LANG="en_US.UTF-8:ISO-8859-1"
    LC_TIME="pt_BR.UTF-8:ISO-8859-1"
    And here's the output of the command "locale -a" :
    C
    en_US.utf8
    POSIX
    Last edited by regmoraes (2015-04-17 12:55:19)

    Thing is, when I run locale -a, I get
    $ locale -a
    C
    de_DE@euro
    de_DE.iso885915@euro
    de_DE.utf8
    en_US
    en_US.iso88591
    en_US.utf8
    ja_JP
    ja_JP.eucjp
    ja_JP.ujis
    ja_JP.utf8
    japanese
    japanese.euc
    POSIX
    So an entry for every locale I have uncommented in my locale.conf. Just making sure, by "following the steps in the beginner's guide", you also mean running locale-gen?
    Are those folders on a linux filesystem like ext4 or on a windows (ntfs?)

  • [svn:fx-trunk] 7661: Change from charset=iso-8859-1" to charset=utf-8" and save file with utf-8 encoding.

    Revision: 7661
    Author:   [email protected]
    Date:     2009-06-08 17:50:12 -0700 (Mon, 08 Jun 2009)
    Log Message:
    Change from charset=iso-8859-1" to charset=utf-8" and save file with utf-8 encoding.
    QA Notes:
    Doc Notes:
    Bugs: SDK-21636
    Reviewers: Corey
    Ticket Links:
        http://bugs.adobe.com/jira/browse/iso-8859
        http://bugs.adobe.com/jira/browse/utf-8
        http://bugs.adobe.com/jira/browse/utf-8
        http://bugs.adobe.com/jira/browse/SDK-21636
    Modified Paths:
        flex/sdk/trunk/templates/swfobject/index.template.html

    same problem here with wl8.1
    have you sold it and if yes, how?
    thanks

  • [Solved] Automount Generic MP3 Player with UTF-8 encoding

    Hello, everybody!
    Ubuntu refugee here.
    So far I'm going fine with Arch, I just have a couple of problems related to my Generic USB Mp3 player:
    1) I want HAL to mount the player with UTF-8 encoding. Right now, it shows Arabic characters as ??????.
    2) In Ubuntu, it used to recognize the player as an MP3 player, give it a nice icon, and add it as a music source in Rhythmbox. In Arch, on the other hand, the player is mounted as a generic USB flash drive. How can I make Arch recognize it as an MP3 player?
    Thanks in advance.
    Last edited by farghal (2008-05-10 20:17:09)

    GOT IT WORKING!! Yay!
    I got the solution from here:
    http://blog.pcode.nl/2006/08/24/introdu … io-player/
    The trick is to make HAL identify your Digital Audio Player (DAP) by adding a rule to /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi  --  and since, in my case, Ubuntu already had a 10-usb-music-players.fdi file that recognized my player, all I had to do was boot up from an Ubuntu live cd and copy Ubuntu's 10-usb-music-players.fdi over Arch's.
    Now my issues with Arch are down to only one: http://bbs.archlinux.org/viewtopic.php?pid=360647
    Thanks everybody.
    Last edited by farghal (2008-05-10 20:16:49)

  • Message Mapping Problem with UTF-16LE Encoded XML

    Hello,
    we have the following scenario:
    IDoc > BPM > HTTP Sync Call > BPM > IDoc
    Resonse message of the HTTP call is a XML file with UTF-16LE processing instruction. This response should then be mapped to a SYSTAT IDoc. However the message mapping fails "...XML Parser: No data allowed here ...".
    So obviously the XML is not considered as well-formed.
    When taking a look at SXMB_MONI the following message appears: "Switch from current encoding to specific encoding not supported.....".
    Strange thing however is if I save the response file as XML and use the same XML file in the test tab message mapping is executed successfully.
    I also tried to use a Java Mapping to switch encodings before executing message mapping, but the error remains.
    Could the problem be, that the codepage UTF-16LE is not installed on the PI system ? Any idea on that ?
    Thank you!
    Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM
    Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM

    Hi,
    thank your for your answer.
    This is what I have tried to achieve. I apply the java conversion mapping when receiving the response message - i tried to convert the response to UTF-16, UTF-8 but none of them has helped to solve the problem.
    I guess that using adapter modules is not an option either as it would modify the request message, but not the response, right?

  • Export SQL View to Flat File with UTF-8 Encoding

    I've setup a package in SSIS to export a SQL view to a flat file and it's working fine.  I now need to make that flat file UTF-8 encoded.  The package executes but still shows the files as ANSI encoded.
    My package consists of a Source (SQL View) -> Derived Column (casts the fields to DT_WSTR) -> Destination Flat File (Set to output UTF-8 file).
    I don't get any errors to help me troubleshoot further.  I'm running SQL Server 2005 SP2.

    Unless there is a Byte-Order-Marker (BOM - hex file prefix: EF BB BF) at the beginning of the file, and unless your data contains non-ASCII characters, I'm unsure there is a technical difference in the files, Paul.
    That is, even if the file is "encoded" UTF-8, if your data is only ASCII values (decimal values 0-127, hex 00-7F), UTF-8 doesn't really serve a purpose over ANSI encoding.  Now if you're looking for UTF-8 with specifically the BOM included, and your data is all standard ASCII, the Flat File Connection Manager can't do that, it seems.
    What the flat file connection manager is doing correctly though, is encoding values that are over decimal 127/hex 7F in UTF-8 when the encoding of the connection manager is set to 65001 (UTF-8).
    Example:
    Input data built with a script component as a source (code at the bottom of this post) and with only one WSTR output column hooked to a flat file destination component:
    a string containing only decimal value 225 (german Eszett character - ß)
    Encoding set to ANSI 1252 looks like:
    E1 0D 0A (which is the ANSI encoding of the decimal character value 225 (E1) and a CR-LF (0D 0A)
    Encoding set to UTF-8 65001 looks like:
    C3 A1 0D 0A  (which is the UTF-8 encoding of the decimal character value 225 (C3 A1) and a CR-LF (0D 0A)
    Note that for values over decimal 127, UTF-8 takes at least two bytes and up to four for the remaining values available.
    So, I'm comfortable now, after sitting down and going through this, that the flat file connection manager is working correctly, unless you need a BOM.
    1
    Imports System  
    2
    Imports System.Data  
    3
    Imports System.Math  
    4
    Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper  
    5
    Imports Microsoft.SqlServer.Dts.Runtime.Wrapper  
    6
    7
    Public Class ScriptMain  
    8
        Inherits UserComponent  
    9
    10
        Public Overrides Sub CreateNewOutputRows()  
    11
            Output0Buffer.AddRow()  
    12
            Output0Buffer.col1 = ChrW(225)  
    13
        End Sub 
    14
    15
    End Class 
    Phil

  • JSP display problem with UTF-8 encoding

    Hi,
    I'm now writing JSP in order to input English, Traditional Chinese and Simplifed Chinese in the same form of the page. I've set the encoding as below:
    <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head>
    When, I get the user input in the next page, those Chinese become some squares, "?" or strange codes. However, when these data are store into database, and loaded from database, they display correctly in Chinese. That means I cannot get the string correctly directly from getParameter("") in next page.
    What can I do to fix this problem. Thank you so much!
    Zoe

    What is your environment (JDK, Server, DB)?
    Try add this line to the top of your next page to set the encoding character set. Otherwise, it will default to ISO-8859-1 which gives the chinese characters ??? when you try to display them.
    <%request.setCharacterEncoding("utf-8");%>
    Regards
    -WK-

  • Having problems with UTF-8 encoding from WinPhone

    Our sync server (GroupWise Mobility Server) - which supports EAS 14 - is failing to sync an item from a Windows Phone to our email application's calendar.
    As we look at the .ics file created by the Windows Phone, we notice that some characters are not UTF-8 characters as claimed (see .ics file below) and thus, do not decode properly and we drop the sync request.
    .ics file contents:
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft Windows Phone
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:Öйú±ê׼ʱ¼ä
    BEGIN:STANDARD
    DTSTART:20000101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:STANDARD
    END:VTIMEZONE
    BEGIN:VEVENT
    SUMMARY;CHARSET=UTF-8:好吧
    DESCRIPTION;CHARSET=UTF-8:我们俩人呢
    CLASS:PUBLIC
    LOCATION;CHARSET=UTF-8:嗯嗯
    UID:040000008200E00074C5B7101A82E00800000000B0AE9BBDCCB0E642A1A016ED65B5498
     0100000001A7F45FD22126646A347826899970D56
    DTSTART;TZID=Öйú±ê׼ʱ¼ä:20141024T160000
    DTEND;TZID=Öйú±ê׼ʱ¼ä:20141024T170000
    X-MICROSOFT-DISALLOW-COUNTER:FALSE
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    STATUS:CONFIRMED
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=DELEGATED;CN=¨¹?? ¨¹??:MAILTO:deu02@
     mydo43.com
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=user01 user01:MAILTO
     :[email protected]
    ORGANIZER:MAILTO:[email protected]
    DTSTAMP:20141024T075407Z
    LAST-MODIFIED:20141024T075407Z
    BEGIN:VALARM
    ACTION:DISPLAY
    DESCRIPTION:REMINDER
    TRIGGER:-PT15M
    END:VALARM
    END:VEVENT
    END:VCALENDAR

    We just took the Content-Type text/calendar portion, decoded it and this is what we were referring to as the meeting.ics.  
    Here is the MIME that the Windows 8 Phone sends:
    MIME-Version: 1.0
    To: =?utf-8?Q?=C3=BC=C3=B6=C3=A4_=C3=BC=C3=B6=C3=A4?= <[email protected]>,
            user01 user01 <[email protected]>
    Subject: =?utf-8?B?5aW95ZCn==?=
    Date: Fri, 24 Oct 2014 15:54:07 +0800
    Thread-Topic: =?utf-8?Q?=E5=A5=BD=E5=90=A7?=
    Content-Type: multipart/alternative;
            boundary="_6504CEF0-3696-4407-8129-C93E3F2622A6_"
    X-GWTO-BUFFER: =?utf-8?Q?=C3=BC=C3=B6=C3=A4_=C3=BC=C3=B6=C3=A4?=; user01 user01
    --_6504CEF0-3696-4407-8129-C93E3F2622A6_
    Content-Transfer-Encoding: base64
    Content-Type: text/plain; charset="utf-8"
    5oiR5Lus5L+p5Lq65ZGi
    --_6504CEF0-3696-4407-8129-C93E3F2622A6_
    Content-Type: text/calendar; charset="utf-8"; method=REQUEST
    Content-Transfer-Encoding: base64
    QkVHSU46VkNBTEVOREFSDQpNRVRIT0Q6UkVRVUVTVA0KUFJPRElEOk1pY3Jvc29mdCBXaW5kb3dz
    IFBob25lDQpWRVJTSU9OOjIuMA0KQkVHSU46VlRJTUVaT05FDQpUWklEOtbQufqx6te8yrG85A0K
    QkVHSU46U1RBTkRBUkQNCkRUU1RBUlQ6MjAwMDAxMDFUMDAwMDAwDQpUWk9GRlNFVEZST006KzA4
    MDANClRaT0ZGU0VUVE86KzA4MDANCkVORDpTVEFOREFSRA0KRU5EOlZUSU1FWk9ORQ0KQkVHSU46
    VkVWRU5UDQpTVU1NQVJZO0NIQVJTRVQ9VVRGLTg65aW95ZCnDQpERVNDUklQVElPTjtDSEFSU0VU
    PVVURi04OuaIkeS7rOS/qeS6uuWRog0KQ0xBU1M6UFVCTElDDQpMT0NBVElPTjtDSEFSU0VUPVVU
    Ri04OuWXr+WXrw0KVUlEOjA0MDAwMDAwODIwMEUwMDA3NEM1QjcxMDFBODJFMDA4MDAwMDAwMDBC
    MEFFOUJCRENDQjBFNjQyQTFBMDE2RUQ2NUI1NDk4DQogMDEwMDAwMDAwMUE3RjQ1RkQyMjEyNjY0
    NkEzNDc4MjY4OTk5NzBENTYNCkRUU1RBUlQ7VFpJRD3W0Ln6serXvMqxvOQ6MjAxNDEwMjRUMTYw
    MDAwDQpEVEVORDtUWklEPdbQufqx6te8yrG85DoyMDE0MTAyNFQxNzAwMDANClgtTUlDUk9TT0ZU
    LURJU0FMTE9XLUNPVU5URVI6RkFMU0UNClgtTUlDUk9TT0ZULUNETy1BTExEQVlFVkVOVDpGQUxT
    RQ0KU1RBVFVTOkNPTkZJUk1FRA0KQVRURU5ERUU7Uk9MRT1SRVEtUEFSVElDSVBBTlQ7UEFSVFNU
    QVQ9REVMRUdBVEVEO0NOPai5Pz8gqLk/PzpNQUlMVE86ZGV1MDJADQogbXlkbzQzLmNvbQ0KQVRU
    RU5ERUU7Uk9MRT1SRVEtUEFSVElDSVBBTlQ7UEFSVFNUQVQ9TkVFRFMtQUNUSU9OO0NOPXVzZXIw
    MSB1c2VyMDE6TUFJTFRPDQogOnVzZXIwMUBteWRvNDMuY29tDQpPUkdBTklaRVI6TUFJTFRPOmRl
    dTAyQG15ZG80My5jb20NCkRUU1RBTVA6MjAxNDEwMjRUMDc1NDA3Wg0KTEFTVC1NT0RJRklFRDoy
    MDE0MTAyNFQwNzU0MDdaDQpCRUdJTjpWQUxBUk0NCkFDVElPTjpESVNQTEFZDQpERVNDUklQVElP
    TjpSRU1JTkRFUg0KVFJJR0dFUjotUFQxNU0NCkVORDpWQUxBUk0NCkVORDpWRVZFTlQNCkVORDpW
    Q0FMRU5EQVINCg==
    --_6504CEF0-3696-4407-8129-C93E3F2622A6_--
    When you decode the text/calendar data, this is where you will find the characters that are not valid UTF-8.

  • Problems in displaying chinese characters with utf-8 encoding

    Hi,
    I got problem in displaying chinese characters in my web application.
    I am creating a web application supporting both English and Chinese charaters. What I am trying to do is:
    1. storing some chinese characters via a web page (page1) into database.
    2. retrieve the chinese characters via another web page (page2) from the database.
    Once I put the Chinese characters on the webpage (page1 in step #1), it displayes well (the readable chinese characters) before I submit this page (after submit, the data will be stored into the database).
    But when I tried to display the chiese characters via page2 in step#2, I got un-readable characters displayed.
    The running configuration is: Sun Application Server (coming and with the JSC2) and MySQL server 5.0. And I setup the database server with utf8 as character-set.
    It seems like the chinese characters got messed up throught the round-trip (from page1<----via jdbc---->database<----via jdbc------>page2).
    From the database, I found the chinese characters are there. Any helps are appreciated.

    Hi,
    I am trying to insert new record.The record may contain chineese or English data.
    I did same what u specified.
    first I converted to the byte UTF8.again,I converted byte to string using 8859_1.
    the values are not storing chinese characters.
    pls suggest me.
    below is my code.
                                  ascCode = req.getParameter("asccode");
                                  countryCode = req.getParameter("countrycode");
                                  ascName      = req.getParameter("ascname");
                                  address1     = req.getParameter("ascaddress1");
                                  address2 = req.getParameter("ascaddress2");
                                  System.out.println("ASC NAME:"+ascName);
                                  System.out.println("ADDRESS1:"+address1);
                                  System.out.println("ADDRESS2:"+address2);
                                  ascC = ascCode.getBytes("UTF8");
                                  coun = countryCode.getBytes("UTF8");
                                  ascN           = ascName.getBytes("UTF8");
                                  add1 = address1.getBytes("UTF8");
                                  add2          = address2.getBytes("UTF8");
                                  System.out.println("ASC NAME:"+ascN);
                                  System.out.println("ADDRESS1:"+add1);
                                  System.out.println("ADDRESS2:"+add2);
                                  ascCode = new String(ascC,"8859_1");
                                  countryCode= new String(coun,"8859_1");
                                  ascName = new String(ascN,"8859_1");
                                  address1 = new String(add1,"8859_1");
                                  address2 = new String(add2,"8859_1");
                                  System.out.println("ASC NAME:"+ascName);
                                  System.out.println("ADDRESS1:"+address1);
                                  System.out.println("ADDRESS2:"+address2);
    thanks.

  • Can't use UTF-16 encoding with XML Parser for Java v2.

    This is my XML Document:
    <?xml version="1.0" encoding="UTF-16" ?>
    <Content>
    <Title>Documento de Prueba de gestin de contenidos.</Title>
    <Creator>Roberto P     rez Lita</Creator>
    </Content>
    This is the way in which i parse de document:
    DOMParser parser=new DOMParser();
    parser.setPreserveWhitespace(true);
    parser.setErrorStream(System.err);
    parser.setValidationMode(false);
    parser.showWarnings(true);
    parser.parse(
    new FileInputStream(new File("PruebaA3Ingles.xml")));
    I've got this error:
    XML-0231 : (Error) Encoding 'UTF-16' is not currently supported.
    I am using the XML Parser for Java v2_0_2_5 and I am a little
    confused because the documentation says that the UTF-16 encoding
    is supported in this version of the Parser.
    Does anybody know how can I parse documents containing spanish
    accents?
    Thanks in advance.
    Roberto P     rez.
    null

    Oracle just uploaded a new release of V2 Parser. It should
    support UTF-16.
    Yet, other utilities still have some problems with UTF-16
    encoding. Seems we just
    have to wait this one out.
    BTW, I'm trying to use Japanese. We, also, have some problems
    with JServer.
    Roberto P     rez (guest) wrote:
    : This is my XML Document:
    : <?xml version="1.0" encoding="UTF-16" ?>
    : <Content>
    : <Title>Documento de Prueba de gestin de contenidos.</Title>
    : <Creator>Roberto P     rez Lita</Creator>
    : </Content>
    : This is the way in which i parse de document:
    : DOMParser parser=new DOMParser();
    : parser.setPreserveWhitespace(true);
    : parser.setErrorStream(System.err);
    : parser.setValidationMode(false);
    : parser.showWarnings(true);
    : parser.parse(
    : new FileInputStream(new File("PruebaA3Ingles.xml")));
    : I've got this error:
    : XML-0231 : (Error) Encoding 'UTF-16' is not currently supported.
    : I am using the XML Parser for Java v2_0_2_5 and I am a little
    : confused because the documentation says that the UTF-16
    encoding
    : is supported in this version of the Parser.
    : Does anybody know how can I parse documents containing spanish
    : accents?
    : Thanks in advance.
    : Roberto P     rez.
    null

  • XML stream utf-8 encoding

    Hi folks,
    I'm trying to establish a CSTRING XML stream with utf-8 encoding. I've only managed to do this in XSTRING so far.
    If i use this coding, i get a binary output.
      DATA: gt_result TYPE TABLE OF string,
             l_result type string.
      constants: encoding type string value 'UTF-8'.
      data:  g_ixml type ref to if_ixml.
      data:  g_stream_factory type ref to IF_IXML_STREAM_FACTORY.
      data:  g_encoding type ref to if_ixml_encoding.
      g_ixml = cl_ixml=>create( ).
      g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
      g_encoding = g_ixml->create_encoding( character_set = 'utf-8'
                                            byte_order = 0 ).
      data:  resstream type ref to if_ixml_ostream.
      resstream = g_stream_factory->create_ostream_cstring( l_result ).
      call method resstream->set_encoding
        EXPORTING
          encoding = g_encoding.
    * XML Transformieren
      CALL TRANSFORMATION id_indent
        SOURCE     itab = it_Itab
        RESULT XML resstream.
    * Temporär, XML File erzeugen
      refresh gt_result.
      APPEND l_result TO gt_result.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename         = 'c:test.xml'
        CHANGING
          data_tab         = gt_result
        EXCEPTIONS
          file_write_error = 1.
    Without this expression :
    g_encoding = g_ixml->create_encoding(
                 character_set = 'utf-8' byte_order = 0 ).
    I get a cstring stream, but in utf-16.
    My question now is, how do I manage to get a utf-8 encoded stream in cstring?
    Thanks for your help.
    Cheers
    Daniel

    This is the solution:
    METHOD TRANSFORM_XML.
      TYPE-POOLS TRUXS.
    *********************** XML ***********************************
      DATA: GT_RESULT TYPE TABLE OF STRING,
             L_RESULT TYPE ETXML_LINE_STR.
      CONSTANTS:  ENCODING     TYPE STRING VALUE 'UTF-8'.
      DATA:  G_IXML TYPE REF TO IF_IXML.
      DATA:  G_STREAM_FACTORY TYPE REF TO IF_IXML_STREAM_FACTORY.
      DATA:  G_ENCODING TYPE REF TO IF_IXML_ENCODING.
      G_IXML = CL_IXML=>CREATE( ).
      G_STREAM_FACTORY = G_IXML->CREATE_STREAM_FACTORY( ).
      G_ENCODING = G_IXML->CREATE_ENCODING( CHARACTER_SET = ENCODING
                                            BYTE_ORDER = 0 ).
      DATA:  RESSTREAM TYPE REF TO IF_IXML_OSTREAM.
      RESSTREAM = G_STREAM_FACTORY->CREATE_OSTREAM_XSTRING( L_RESULT ).
      CALL METHOD RESSTREAM->SET_ENCODING
        EXPORTING
          ENCODING = G_ENCODING.
    * XML Transformieren
      CALL TRANSFORMATION ID_INDENT
        SOURCE     ITAB = IT_ITAB
        RESULT XML RESSTREAM.
    * XString to String
      CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
        EXPORTING
          IM_XSTRING  = L_RESULT
          IM_ENCODING = 'UTF-8'
        IMPORTING
          EX_STRING   = E_XML.
    * Temporär, XML File erzeugen
      refresh gt_result.
      APPEND e_xml TO gt_result.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename         = 'c:test.xml'
        CHANGING
          data_tab         = gt_result
        EXCEPTIONS
          file_write_error = 1.
    ENDMETHOD.
    How can I give the 10 points to myself?
    Cheers
    Daniel

  • Please Help - Very strange problem with internal String encoding

    I created a file in one-byte russian encoding cp1251 and declared String literal with 2 letters:
    String str = "ab"; //attention! ab - two russian characters
    After I got bytes from it - str.getBytes("cp1251") - it returned 2 byte's array.
    Now I created a file with UTF-8 encoding with equal content and suddenly:
    After I got bytes from it - str.getBytes("cp1251") - it returned 4! byte's array. Why?
    I need to get a one-byte encoded arrays (cp1251 or koi8-r) but getBytes ALWAYS returns two-byte encoded arrays.
    It is very strange: cp1251 is always one-byte encoded, but .getBytes("cp1251") returns two-byte on each letter. Why? Please help.

    I did not read a string from a file. I created 2 .java files with different encodings (cp1251 and UTF-8) and compiled them, telling compiler with -Dfile.encoding=*** to read them correctly. While execution java interprets two looking equal in editor strings as different objects with different .intern() representation.
    Why java consider source .java file encoding while creating internal representation of String object and creates from looking equally in editor strings two DIFFERENT Unicode representations. And it is impossible to convert one representation to other - impossible to get two equal byte[] arrays.

  • Steps to UTF-8 Encoding with Oracle 8i and Weblogic 6.1SP1

    What are the Steps to UTF-8 Encoding with Oracle 8i and Weblogic
              6.1SP1?
              I have:
              - Oracle 8.1.5 database created with character set=UTF8 and national
              character set=UTF8
              - Weblogic 6.1SP1 without any encoding mechanism set
              (though I did play with
              <jsp-param><param-name>encoding</param-name>
              <param-value>UTF-8</param-value>
              </jsp-param>
              in the weblogic.xml for a while though it seemed not to make a
              difference)
              - JSP pages set to content='text/html; charset=UTF-8'
              - JSP form POSTs set to enctype="UTF-8"
              I can copy and paste Chinese Kanji from a UTF8 encoded web page into
              form text boxes but when I post the data it comes back as different
              Kanji. Then once it is posted the Kanji stays the same on repeated
              posts. The same Kanji text also looks different when viewed in a form
              text box than when viewed as straight text on the page.
              Is there anything else? Or am I already encoding characters twice?
              Please help!
              Mel Christie
              

    Hi Experts,
    Please correct me if am asking you the question in wrong way.
    I have ARCGIS with oracle database 10gr2 in production server.
    My work is to connect AUTOCAD S/W (client computer which is connected in LAN) to ARCGIS in order to access the toposheets available in SDE user.
    When iam trying to connect iam getting this error:The specified credentials are not valid or provider is not able to establish a connection.
    I checked the path to production server by pinging and user/passcode too but not helpful.
    Please help me in this , very urgent.
    Thanks.
    Edited by: user13355644 on Jul 3, 2010 3:53 AM
    Edited by: user13355644 on Jul 22, 2011 2:55 AM

  • File encoding with UTF-8

    Hello all,
    My scenario is IDoc -> XI -> File (txt).
    Everything was working fine until i have to handle eastern european language with weird symbol
    So in my file adapter receiver, i'm using the file encoding code UTF-8 and when i look my field in output, everything is fine.
    BUT, when i look in binary, the length of these field is not longer fixed because a special character takes 2 bytes instead of one.
    I would like to know if it's possible to handle those characters with a file encoding code UTF-8 in a fixed length field of 40 characters for example don't want a variable length for my fields...
    Thanks by advance,
    JP

    I agree with you. In XI, i don't have this problem, i have it in my ouput file when i edit my text file in binary mode !
    My field should be on 40 characters but the special symbol which take 2 bytes instead of 1 make the length of my output fields variable !!!
    My question was to know if there is a way to have a fixed length in my output file..
    Sorry if i wasn't clear in my first post.
    JP

Maybe you are looking for

  • Change default language of Ip phone on CUCM 7

    Hello Everybody, I have Publisher Cucm 7.1 installed on my cluster, and i need to change the default-language of all my phone inside my cluster to Portuguese, Someon know , how can i do that? Thx in advance

  • Fifth Third Bancorp to Consolidate Up to 100 Branches

    Fifth Third Bancorp FITB -0.43 % said it plans to consolidate or sell about 100 of its branches and about 30 other properties, a move that comes as mobile and electronic banking grow in popularity. http://www.wsj.com/articles/fifth-third-bancorp-to-c

  • How do I reset without an Apple Computer?

    I have a PC computer so I don't have an Apple to reset my phone, how do I go about this dilemma?

  • Destination folder is greyed out

    I'm trying to synchronize a large folder of music files from my computer (Win 8.1) to the micro SD card on my phone (Android), via Synctoy 2.1.  When I set up the sync, I select my left folder (fine, no problem), but when I try to select my right fol

  • Am I doing this right?

    Hi all - I apologize in advance if this sounds really stupid and convoluted, but this is my first foray into wireless. I have a 17" 1.25GHz FP imac running 10.4.8 - it also doesn't have an airport card. It's had a horrendous hardware history (not eve