Reading spanish character in a unicode system

Hi everyone
i am getting a dump while reading a spanish character in the flat file using Open dataset.
OPEN DATASET g_datei FOR INPUT IN TEXT MODE ENCODING DEFAULT.
when i cheked the flat file in AL11 it is showing # in the place of the spanish character.
is it the unicode problem?

You can try using this. It's a little test page for dealing with Chinese (and others) in the browser. I find that if Chinese works, any others should also. Assuming you have the right fonts, of course.
_lang.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="Generator" content="TextPad 4.0" />
     <meta name="Author" content="" />
     <meta name="Keywords" content="" />
     <meta name="Description" content="" />
</head>
<body bgcolor="#ffffff" background="" text="#000000" link="#ff0000" vlink="#800000" alink="#ff00ff">
<%
request.setCharacterEncoding("UTF-8");
String str = "\u7528\u6237\u540d";
String name = request.getParameter("name");
if(name != null) {
     // instead of setCharacterEncoding...
     //name = new String(name.getBytes("ISO8859_1"), "UTF8");
System.out.println(application.getRealPath("/"));
System.out.println(application.getRealPath("/src"));
%>
req enc: <%= request.getCharacterEncoding() %><br />
rsp enc: <%= response.getCharacterEncoding() %><br />
str: <%= str %><br />
name: <%= name %><br />
<form method="GET" action="_lang.jsp" encoding="UTF-8">
Name: <input type="text" name="name" value="" >
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

Similar Messages

  • Unable to display Chinese character in non-unicode system properly.

    Hi, all
    My system has been upgraded from 4.6C to 6.0 which is non-unicode system. Chinese characters with long length will be cut and cannot wrap automatically. But it's OK to alphabetes. How could I resolve this?
    Thanks..
    TD. Wei

    The simple and easy way to check
    non-unicode character sets are not supported on unicode system any longer. Am I right?
    Transaction code i18N
    Select
    trouble shooting --> printing  test --> smartforms --> multiple scripts, select your output device and see print preview. it will display all supported characters.
    I guess, above information will be useful for closing the thread.
    Regards,
    SaiRam

  • Reading one character from System.in

    Is it possible to read just a single character from System.in without the user having to hit "Enter" to accept the character?
    Thanks.

    Is it possible to read just a single character from
    System.in without the user having to hit "Enter" to
    accept the character?
    Thanks.No, System.in is a stream which only gets things put into it when the user hits Enter. If you want to directly interact with the keyboard (not System.in), then you need a GUI-type of app, or use a 3rd-party API such as you could find if you searched the internet for "java curses".

  • Unable to properly read a binary .xls file in a unicode system.

    Hello,
    We are currently upgrading to ecc 6 unicode
    from a non unicode ecc5 system and we have
    found several problems reading files for
    Excel in place (sap office intergration).
    We have an excel file with macros scripted
    within it and it, parts of the file are in
    hebrew.
    We use open dataset for input command to
    provide the data to the sap integration
    methods.
    In ecc5, no additional parameters were
    needed for the command.
    In the unicode system, the file isn't read
    properly even when providing codepage for
    the file in legacy binary mode (I tried '1800' and '1810' for hebrew).
    When compared to a non unicode system, it seems
    that some of the binary data is missing and some
    characters are missing and instead appear
    like squares.
    this leads to the file not being read at
    all.
    Is there any method to read the file with
    the characters in it properly , or force it
    to use the non unicode read method?
    Best regards, Yoav

    Try the Acrobat forum; this is the Adobe Reader forum.

  • Need to assign a multi datatype struct to a single field in Unicode system

    Hi all,
    I had posted an earlier question related to this to understand what the issue is. Few responses helped. Then now I have gone thru the conversion rules in Unicode systems related to assigning a structure (with different data types) to a single field and looking for a solution for my case. The current code written in 4.6 says
    l_bapiparex-valuepart1 = l_bape_vbap
    where
    l_bape_vbap is a structure of type bape_vbap and
    l_bapiparex of type bapiparex.
    So according to the rules, when I do this kind of an assignment in ECC , the first field's length (i.e. VBELN) must be min 240 characters long. Only then this assignment will be error free, am I right ?
    Or Is this an inadmissable assignment situation ?
    If not then is there any other way how I can achieve the same result by fixing this issue ? I am not able to think of any !! Has any one come across this kind of an issue during upgrade? Please do suggest.
    Just for your reference I have pasted the rule details from SAP help..
    Conversion in Unicode Programs
    The following rules apply in Unicode programs when converting a flat structure to a single field and vice versa:
    If a structure is purely character-like, it is processed during conversion like a data object of the type c (Casting). The single field can have any elementary data type.
    If the structure is not purely character-like, the single field must have the type c and the structure must begin with a character-like fragment that is at least as long as the single field. The assignment takes place only between this fragment and the single field. The character-like fragment of the structure is treated like a data object of the type c (Casting) in the assignment. If the structure is the target field, the remaining character-like fragments are filled with blanks and all other components with the initial value that corresponds to their type.
    No conversion rule is defined for any other cases, so that assignment is not possible.
    Note
    If a syntax error occurs due to an inadmissible assignment between flat structures and single fields, you can display the fragment view of the corresponding structure when displaying the syntax error in the ABAP Editor by choosing the pushbutton with the information icon.
    thanks

    Try this way
          call method cl_abap_container_utilities=>fill_container_c
            exporting
              im_value               = l_bape_vbap
            importing
              ex_container           = l_bapiparex-valuepart1
            exceptions
              illegal_parameter_type = 1
              others                 = 2.

  • Native sql not populating correct data in ECC6.0 unicode system

    Hi,
    I am working in an upgrade upgrade project from 4.6c to ECC6.0.
    4.6c is non-unicode system. ECC6 is Unicode system.
    I am facing Native SQL problem in custom developed programe in ECC6.That means programe reading the data from oracle datbase and stored into internal table.
    But data not stored as normal character format that means its stored as different character format.
    I am suspecting this is due to unicode system. IF that is issue then please provide
    what syntax I have to use for Native SQL statment in unicode system.
    I have provided the code which we are using in programe.
      data:
        i_locn       type table of t_locn,
        v_locn       like line  of i_locn.
      field-symbols:
        <f_005t>        type t_005t.
    Get existing EIS_VIDEO_LOCN_CONV records
      EXEC SQL.
        OPEN C FOR
          SELECT EIS_LOCN
            FROM VIDADMIN.EIS_VIDEO_LOCN_CONV
      ENDEXEC.
      do.
        EXEC SQL.
          FETCH NEXT C
            INTO :V_LOCN-EIS_LOCN
        ENDEXEC.
        if sy-subrc ne 0.
          exit.
        endif.
        append v_locn to i_locn.
      enddo.
      EXEC SQL.
        CLOSE C
      ENDEXEC.
      sort i_locn.
    I am facing the problem in i_locn internal table. Please give me your input to solve this issue.
    - Anandakumar K

    Hi,
    We have resolved this issue with BASIS team help.
    We modified the data charcater set as UTF8  in Oracle data base in unicode system ECC6.0 then the programme returns the
    exact character format
    Regards
    K.Anandakumar

  • TABLE_ENTRIES_GET_VIA_RFC in unicode system

    Hi all,
    I know this is going to be a long initial post, but please please take the time to read it. Otherwise there would be many unnecessary questions.
    We are using a middleware for mobile devices that reads connects to SAP for reading table data (via a.m. RFC) and posting RFCs/BAPIs.
    Now we try to connect to an unicode SAP system (6.20). The statement
    SELECT * FROM (TABNAME) INTO TABLE TABENTRY WHERE (SEL_TAB)
    where TABENTRY is a table of type char(2048) does not work any more as in unicode systems the structure of the db table and the internal table have to be the same.
    So we found the fm CRM_CODEX_GET_TABLE_VIA_RFC in CRM which is built from a copy of the a.m. fm and solves this problem by
    1.) creating dynamically an internal table of the same type as the db table.
    2.) select the data into this new internal table
    3.) loop over the internal table and converting each field of its structure to a char variable and then appending it to a the result char(2048).
    Theoretically everything's ok. The fm works now and returns correct data. But there's still one problem, the middleware doesn't convert the data correctly, as the values of fields of type 'p' are passed differently.
    non unicode (standard fm):
    1000000000000280401011000COMPDL              200408 ###E8##############################
    unicode (changed fm):
    1000000000000280401016000COMPDL              200504 10.000       0.000        0.000        0.000
    As you can see, the select statement from the top of this post just puts the data into the string without actually converting the numbers in fields of type p (or QUAN, CURR in db).
    The changed fm with converting every field also converts the number values, now they appear as char fields.
    The middleware tries to convert the number values, but always returns 0 (I can only the results as the actually programming is a black box for me).
    Has anyone any idea how to solve this problem? (beside getting help from the middleware vendor, which is difficult, as there is a new release working with unicode systems. But we will stay on the old release for some months from now...)

    Hi Raja,
    thanks for your answer.
    I had already searched the forum and found your document about RFC_READ_TABLE which I think is quite interesting and a good solution.
    But unfortunately, I cannot change the middleware's RFC logic, e. g. change the BAPI or make changes to the in-/output streams.
    I now live with a workaround:
    I modified the RFC to convert all p type fields to character fields and also changed the metadata RFCs accordingly, which works OK.
    For all RFCs I use to post data to SAP, I write a wrapper RFC with character only structures and convert them to the internal RFCs inside SAP.
    This is not my preferred solution, but I am very short of time and it works pretty well.
    Regards,
    Hans

  • Spanish display incorrect after unicode conversion

    Dear Experts,
    Currently we upgrade our SAP system from 4.6B NU to ECC6.0 UN.
    in 4.6B system we had implemented Simple Chinese and French language package to the system. after upgrade to ECC6.0 no-unicode system. we perform a MDMP unicode conversion.currently system running with ECC6.0 unicode interface with language 1EFD. SUMG releated tasks had been finished. Chinese and French language checked OK in ECC6 UN system.
    Our issue is. in the past time. some Spanish local end user typing some spanish character in some master date field when they login in 4.6B GUI choice english as login language.these kind of spanish characters could not display correct in current unicode environment.
    could you please given us some suggestion for how to fix this issue.

    Hello Anil,
    Below items we checked between MDMP 46B and Unicode ECC6 with production client table SKAT. some Spanish display not correct.
    Unicode ECC6.0     46B
    Short Text     Short Text
    Ant a prov - Gto imp     Ant a prov - Gto imp
    Regal¨ªas     Regalías
    Prov Herramentales     Prov Herramentales
    Provisi¨®n de SLA     Provisión de SLA
    Prov Fin Vida (EOL)     Prov Fin Vida (EOL)
    Gtos de imp     Gtos de imp
    Mat dañado o perdido     Mat dańado o perdido
    Papeleria e insumos     Papeleria e insumos
    Gastos Vtas-Diseño     Gastos Vtas-Diseńo
    Ganancia p fluc camb     Ganancia p fluc camb
    Aj anual p inf     Aj anual p inf
    Depreciaci¨®n fiscal     Depreciación fiscal
    Best Regards
    Key

  • Build new database through scripts must understand spanish character sets.

    Hello Gurus,
    I need some simple advice, a good chance for some quick points for you.
    I have never built a database to understand any other character set other than American English. I now have to build a database that will be used for Spanish characters- keyboards, etc. But I will be using English for the 11g software install. I only wish to be able to show Spanish characters in the data for customers names.
    I will be creating the database with scripts I have made to make the standard template for database files, control files, etc.
    Then I will be importing from a dump I have done that was made with American English character sets.
    System is 11g (11.2.0.3.0) on Linux Enterprise Server 5.8.
    I was thinking to use the AL32UTF8 character set, but I am unsure where to use it.
    My original test did not show Spanish characters for customers names like the 'tilda' or 'sueano' (pardon my spelling). But in this case I did not make the exeception for Spanish, I only used the standard American English build (no changes in the init.ora file or initial database build script).
    How can I adjust my parameter file for the initial creation of the database template to be able to understand the Spanish character set and still be able to import my dump file without error.
    EXAMPLE of a build script:
    CREATE DATABASE mynewdb
    USER SYS IDENTIFIED BY sys_password
    USER SYSTEM IDENTIFIED BY system_password
    LOGFILE GROUP 1 ('/u01/app/oracle/oradata/mynewdb/redo01.log') SIZE 100M,
    GROUP 2 ('/u01/app/oracle/oradata/mynewdb/redo02.log') SIZE 100M,
    GROUP 3 ('/u01/app/oracle/oradata/mynewdb/redo03.log') SIZE 100M
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    CHARACTER SET US7ASCII
    NATIONAL CHARACTER SET AL16UTF16
    If I replace NATIONAL CHARACTER SET AL16UTF16 to AL32UTF8 will it work to show Spanish characters?
    Sorry for the long winded question, any advice will be great.
    Thankfully,
    Shawn

    Hello,
    the national charsets is for column types like nvarchar not for normal varchar data types. So if your dump file contains such column types you will also need to set it. The charset is for the normal column types like varchar. The use of unicode is best pratice if you use multiel language, but keep in mind that multibyte charset can be a problem during the import because varchar2(10) means 10byte and not 10 chars, so errors like identifier to long can occur during import.
    You can create the database.
    Check this documentation:
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch2charset.htm
    You can use a charset like WE8MSWIN1252 which covers spanish also (as far i know) and is a superset to us7ascii
    regards
    Peter

  • Translate string using hex(0020) in Unicode system.

    Hello all,
    We are facing a problem of the "translate" statement in the Unicode system.
    The original statement goes as follows:
    TRANSLATE BULOG USING WS_STRING1.
    Here  BULOG is a structure and ws_string1 is declared as follows:
    DATA : ws_string1(2) type x value '0020'.
    On compilation in the new system which is Unicode enabled, the above mentioned statement removes all the '#' placed in the structure.
    We tried the following statement instead of the original TRANSLATE statement.
    TRANSLATE BULOG USING SPACE.
    But this statement leaves the '#' unchanged.
    We have already REPLACE statement after converting the structure contents into a string.
    We have also tried the convert methods of the classes CL_ABAP_CONV_IN_CE and CL_ABAP_CONV_OUT_CE.
    Hoping to receive a fast response.
    Thanks in advance.
    Zankruti.

    You might want to read ABAP Help on TRANSLATE:
    Addition 2
    ... USING  pattern
    Effect
    If you specify USING, the characters in text are converted according to the rule specified in pattern.
    pattern must be a character-type data object whose contents are interpreted as a sequence of
    character pairs.
    Your option 1 is not working because type X is "Byte field", technically it's not a character-type. Your option 2 is not working because <pattern> must be a sequence of character pairs (you had just SPACE).
    In Option 1 just change the definition from X to C or STRING.

  • How to find as ascii value for a string or char in unicode system?

    Hello,
    How to find an ascii value for a string or char in unicode system?
    Thanks in Advance

    hi ,
    report demtest.
    data : c.
    field-symbols : <n> type x.
    data : rn type i.
    c = 'A'.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    This will convert 'A' to 65.
    Tom Demuyt
    How to convert ascii value to character.
    If I give input as 65 (ascill value) I want display 'A'.
    Below logic is for convert from character to ascii value , now I want to know how to convert ascii value to character.
    Naveen
    report demtest.
    *going from A to 65
    data : c value 'A'.
    field-symbols : <n> type x.
    data : rn type i.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    *going from 66 to B
    data : i type i value 66.
    data : x type x.
    field-symbols : <fc> type c.
    move i to x.
    assign x to <fc> casting type c.
    move <fc> to c.
    write c.
    regards,
    venkat.

  • Error during Upgradation SCM 5.0 to SCM 5.1 Non-Unicode System

    Hi,
    I am Upgrading SCM 5.0 Non-Unicode System to SCM 5.1 Non-unicode on Windows 2003 Server with MSS 2005 DB. During the initial PREPARE (EXTRACTKRN_PRE) phase I am getting an error like
    init
    2010/06/15 07:03:45 PREPARE: START OF PHASE EXTRACTKRN_PRE
    ERROR: Cannot find file 'C:\SCM_2007_Upgrade_Media\51033508_8\NW_7.0_SR3_Kernel_WINDOWS__LNX_X86\KN_WINDOWS_X86_64_AUPG
    KERNEL.TOC'
    SEVERE ERROR(S) OCCURRED IN EXTRACTKRN_PRE !!!
    The file name it is looking for does not exist in any of the Kernel versions I have checked. If I try to skip this step it is asking for the PASSWORD. How can I get this password? (only from SAP Support or any note?).
    What is the Solution for the above ERROR. Please help.
    Thanks,
    Ajay.

    > I am not posting the question in the same group. I am posting in different groups due the confusion of in which group to post > > and of course to get faster response. All people cant check all the groups to answer. Moreover I am not keeping the questions > open. As soon as I get the answer I am proving the answer in every group and immediately closing the question.
    > So what is the problem with that? I do not think this is creating any inconvenience to any one, just increasing the number of questions in the group.
    This is not wanted as written in the "Rules of engagement". This is a public forum, not a "help desk".
    > OK, As you said If I post only in a single group do you guarantee that you will check every time all the groups to answer my question/ find my question?
    Again, this is a forum where the question are answered on a volunteered basis. "Demanding" help is not the way to go, you can ask for help but there's no guarantee that you'll get an answer. If you urgently need help use the official support channels or get yourself a consultant on-site who can answer all your question instantly.
    > And please paste the URL of those rules that this is wrong. Since I didnt read that.
    It's the first entry in every forum, it contains the "Rules of Engagement" which say:
    Please do not Cross post.
    Post your question in the most appropriate forum; not multiple forums. This is bad netiquette and will might only aggravate potential repliers.
    Just imagine if everyone like you would paste questions in several forums.
    Markus
    Edited by: Markus Doehr on Jun 15, 2010 5:29 PM
    Edited by: Markus Doehr on Jun 15, 2010 5:30 PM

  • Unable to Open unix file in UNICODE system which created NON-UNICODE system

    Unable to Open unix file in UNICODE system which created in NON-UNICODE system
    We have two SAP systems both are ECC6.0 but System 1 is NON-Unicode and System2 is Unicode system.
    There is a common unix directory/folder for both system.
    Our requirement is to create one file on unix common folder and write the data to file from system1 .
    In system2 open the same file for appending mode to write the data .
    The file in system 1 created with below sentence.
    OPEN DATASET g_unix_file FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
    Now I have to append the data from system 2 to same file.
    I have tried to used below statement in system 2 to open the file but sy-subrc value comes as '8'.
    1> OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING UTF-8.
    2>OPEN DATASET g_unix_file FOR APPENDING IN legacy TEXT MODE CODE PAGE
    cdp IGNORING CONVERSION ERRORS  .
    3>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING Default.
    4>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING NON-UNICODE.
    Tried out all the possibilities as per F1 help given for open dataset , but still there is problem with opn file in appending as well output mode.However the file successfully open in Input mode(Read).
    Please advice suggestion to resolve this issue.
    Thanks.

    Messgae captured as 'Permission Denied". The program gets triggered with system user Id PPID.
    How to check the security access of the User ID.

  • Question on reading one character at a time.

    Hi. I am assigned a program where I have to read a series of bits (for example: 01010101). Using this I have to make a "graph out of it". The way I am supposed to make a graph is as follows:
    Each bit interval will be represented in the output as a field taht is two characters wide.
    The value of the signal is represented using either + (to represent +voltage) or - (to represent - voltage) and is always the second character in the output field.
    The first character in the output field is either:
    ' . ' = to indicate no change from the previous signal value or
    ' / ' = to indicate a negative to positive transition or else
    ' \ ' = to indicate a positive to negative transition
    Example for input: 01010101 and the output would be . + \ - . - / + \ - . - / + . + \ - / +
    The code that I got so far is that I read the input from the command line as a argument which I know is nothing but I would just like to know how to read the character one by one and make a graph which is totally boggling my mind because I have no idea how I can do it. Thank you for your help.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Encoder
         public static void main(String[] args)
              int b = Integer.parseInt(args[0].trim());
              System.out.println("You spit out --> "+b);

    Alright I sorta got what you were sayin'. The code that I have now is:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Encoder
         public static void main(String[] args)
              String toEncode = String.valueOf(args[0]);
              StringBuffer result = new StringBuffer();
              char lastChar = toEncode.charAt(0);
              char curChar = '0';
              char lastSign = '+';
              int length = toEncode.length();
              for (int i = 0; i < length; i++)
              curChar = toEncode.charAt(i);
              if (curChar != lastChar)
              if (curChar == '0')
              result.append("\\-");
              lastSign = '-';
              else
              result.append("/+");
              lastSign = '+';
              lastChar = curChar;
              else
              result.append(".");
              result.append(lastSign);
              System.out.println("You spit out --> "+result);
    But it doens't work according to what I want it to do. What I need it to do is the following: Lets say we have the input of 01010101, the result we will get is ". + \ - . - / + \ - . - / + . + \ - / +". The reason for this is because of the following: The graph starts on the v all the time. When there is a 0 bit there is no change and when there is a 1 bit there is an inversion of the voltage level so since we started with a 0 bit at v, when we hit 1 bit we would make a inversion to -v and when we hit 0 bit there would be no change. I don't know of what I said is clear to you or not. For this program, what it does for the input of 01010101, the output is
    " . + / + \ - / + \ - / + \ - / + ". Thank you very much.

  • Read a character 1 at a time from a text file

    Hi all,
    I have tried the following to read 1 character at a time from a text file but it did not work;
    int buf_sz = 1;
             try
                BufferedReader br = new BufferedReader( new FileReader( "C:\\bitshift.txt", buf_sz ));
                String rd_line = null;
                while( (rd_line = br.readLine()) != null)
                    System.out.println(rd_line + "\n");
             }I could only get it to read the whole line by removing the buf_sz when creating an instance of the BufferedReader.
    How can I achieve this?
    Thanks

    The Javadoc for Reader.read()
    read
    public int read()
             throws IOException
        Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.
        Subclasses that intend to support efficient single-character input should override this method.
        Returns:
            The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached
        Throws:
            IOException - If an I/O error occurs

Maybe you are looking for

  • Reversing the financial document

    Hi, I am trying to reverse a journal entry. When i posted the document as well i got the msg as 'Enter a true account assignment object with revenues. I posted the document using BAPI_ACC_DOCUMENT_POST. Though i got the msg the document is posted. Fo

  • EVT_, SM and SMP_ tables in a user schema

    I found some tables and indexes in a user schema that this user hasn't created. 15 tables have a prefix EVT_, about 35 start with SM and about 30 have the prefix SMP_ . It seems they are some type of tables created by Oracle. What are they for and ca

  • EWA config

    Hi Gurus I am new to Solution manager. i have solman 4.0   SP12,    ST_PI 2005_1_700 ST-SER     700_2007_1 0001 SAPKITLOM1      Service Tools,    SAPKITLQI5 I want to setup EWA for R/3 production system from  my solution manager system 4.0 which i in

  • Previous Version of QT

    Where do I find the original QT 7 download? Just did archive and install, taking me back to 10.3.5 and QT 6.5.1 I want to get to QT 7.1.5 eventually.

  • Free trial expired after 15 days

    I signed up for a free trial on 2/2/15. I'm trying to update a document with InDesign today, but keep being told my trial has expired and I need to pay to continue. Is there any way around this? Is it not a 30 day trial?