Help me...unicode

I have two pages:
First one is a html form page. Source like this:
Send.html
<html><head><title>Unicode Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head>
<body>
<form method="post" action="Receive.jsp">
<input type="text" name="txtSend"><BR>
<input type="submit" name="Submit" value="Submit"></BR>
</form>
</body>
</html>
Second one is a jsp page. Source like this:
Receive.jsp:
<%@ page contentType="text/html;charset=UTF-8"%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head>
<body>
String txtReceive = request.getParameter("txtSend");
byte buff[] = txtReceive.getBytes("ISO-8859-1");
String txtFinal = new String(buff,"UTF-8");
out.print(txtFinal);
</body>
</html>
The input string (in html page) is a unicode string (in Vietnamese), but the output string (in jsp page) is always junk characters. I don't know why?
Thanks for everyone.
pvthem

I have tried your code but with:
out.println("<font face=\"Arial\">" + text + "</font>");
Everything is right. I am using Tomcat 3.2.1. You can get right result if you change font of browser to Arial (IE and Netscape).
Good luck.
nqthanh

Similar Messages

  • Need help on Unicode

    Hi experts,
    I am going to use unicode concept in my  web Dynpro application. I do not have
    any idea about that. Can any one help me?
    Advance Thanks
    P.J.Balaji

    Hi Balaji..
    Check this links..
    <a href="http://www.pccl.demon.co.uk/java/unicode.html">Uni Code in java</a>
    http://www.sap-press.com/product.cfm?account=&product=H1984
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5001004f-ce99-2910-8fa9-c5e564a5f318">Detailed concepts abt uni-code</a>
    /message/1083079#1083079 [original link is broken]
    Hope this il helpful for u..
    URs GS

  • Help with unicode String?

    Hi there,
    I have a file that I need to read in and process. Took a while for me to realise it was unicode ("text from my file" was printing out as "t e x t f r o m m y f i l e") - Anyway, got there in teh end using:-
    InputStreamReader fis = InputStreamReader(new FilInputeStream(filename), "UTF16");
    dataSource = new BufferedReader(isr);My problem now is that I'm splitting the line (which is a comma seperated list of numbers) and coverting to int's:-
    String line = dataSource.readLine();
    String[] items = line.split(",");
    int[] values = new int[12];
    for(int i = 1; i < items.length; i++)
       values[i-1] = Integer.parseInt(items);
    Values is what I expect, a list of numbers, but items[] is being set to 0. Is this something to do with unicode? Must admit, I've never given the charater encoding any though up until now.
    Any help would be really appreciated.
    Thank,
    Steve
    using

    Sorry, found it. It was actually a buffer issue. For the record, just because I'm printing output in the middle of the loop, doesn't mean the value exists to be printed by the time System.out.println gets to it (my code was creating an exception for an unrelated reason a few lines down)
    Thanks for your responses.
    Steve

  • Please help (urgent) unicode error

    Hi experts ,
    i have these two structure in my code .plz hel me in resolving these issuses.
    according to me i am gettin this error bcoz of this statement
    <b>tab1 TYPE x,</b>
    plz help me as it is very urgent for me
    thanx in advance.
    DATA:BEGIN OF it_file OCCURS 0,
            rec(1200),
       END OF it_file.
    DATA:BEGIN OF it_proj OCCURS 0,
           line_id(1) TYPE c,
           tab1 TYPE x,
           pspid LIKE proj-pspid,
           tab2 TYPE x,
           post1 LIKE proj-post1,
           tab3 TYPE x,
           vernr LIKE proj-vernr,
           tab4 TYPE x,
           astnr LIKE proj-astnr,
           tab5 TYPE x,
           status LIKE tj02t-istat,
           tab6 TYPE x,
           prctr LIKE proj-prctr,
           objnr LIKE proj-objnr,
       END OF it_proj.
    error coming in statement:
    APPEND LINES OF it_proj TO it_file.
    error is :
    "IT_FILE" and "IT_PROJ" are not mutually convertible. In Unicode          
         programs, "IT_FILE" must have the same structure layout as "IT_PROJ",independent of the length of a Unicode character.

    Hi,
      Could you tell which phase of the upgrde you are getting the error and what is the exact error message
    Regards
    Srivatsa.V

  • Weird Symbols in my Text! Help! (Unicode?)

    So, InDesign has decided to change certain character combos into weird characters. When I copy them out, they show up right in every other program - but they print and export wrong (otherwise I wouldn't care too much).
    il = S with a v mark on top (I don't even know how to make it with the keyboard, or what it's called.)
    io = Ú
    There may be more that I haven't come across yet.
    It's done this before, but I don't remember how I fixed it. It had something to do with changing to or from some kind of Unicode, I think.
    Working in Snow Leopard, CS6 with Cloud.
    Thanks! -T
    EDIT: It doesn't do it in certain boxes, but I have no idea why some and not others.
    EDIT 2: FIXED! Yay for corrupt fonts! (/sarcasm) Deactivating and then reactivating the trouble fonts fixed the problem.
    It's still an InDesign bug though, since it DOESN'T affect any of my other programs. Omg. That was not cool to happen on deadline.

    Glad you could get it to work again! Nothing like a good deadline to encounter such problems.
    Here is a bit of background information:
    A font consists of 'regular' characters (which you can type in from a keyboard; those are indeed Unicode characters), 'special' characters (ligatures, Real Small Caps, Oldstyle numbering, etc., which typically are not valid Unicode characters), and a list of commands which say "if these two character go in, replace them by this single other one instead". That list of commands specifies OpenType ligatures -- and it doesn't really work on characters, but on glyphs instead. A 'character' has a Unicode value, but a 'glyph' may not have one -- it's just an index in the list of all individual drawings in the font, specifying the nth glyph in there.
    When all's well, this is not something you'd ordinarily notice. InDesign keeps a list of all fonts, and of all characters and glyphs in all of these fonts, and its OpenType Glyph relations (which, as you may deduce, are only valid for the font they appear in -- some fonts have more "glyphs" than others, and the Glyph Order varies wildly from one font to another, as you can see in the Glyphs Panel when sorted on "GID" (= "Glyph ID")).
    What happened with your system is that presumably InDesign got the list of 'glyphs' from one file, but OpenType features from another file, with the exact same font name! So the perfectly normal operation "if you see glyph number 15 followed by glyph number 31, replace it with glyph number 65", meaning for that one font "replace "f" followed by "i" with the glyph "fi"", got confused and instead came to mean "replace "i" followed by "l" with "Š"" (its proper name is "S Caron", with the Caron being this V accent).
    So possibly you had more than one version of the same full font name installed (not the file name, but the internal full font name; "Times New Roman Italic", for example). One of the tricks to check this is to select this weirded-up text and disable Automatic Ligatures. If you see it revert to readable text, then this was the issue.
    It's also possible something inside your system got confused -- InDesign, written by Adobe, accessed loads and loads of Extra Tricks in fonts that your typical other software doesn't care, or even know, about. That's why mishaps of this kind are typically picked up first by InDesign.
    The Find Font dialog is your friend in tackling this issue. You can inspect the file paths of the troublesome fonts, and see if there is anything out of order; for example, you might suddenly see an unexpected file path. A tell-tale sign of Double Font Syndrome is when you physically remove that font file out of InDesign's view, and you can still see it works in InDesign -- but now with another file path in the Find Font dialog. At that point you only have to decide which one of the two was the "correct" font file ...

  • Help with unicodes or glyphs

    Can anybody give me the unicode values for the symbols below?
    a raindrop that is hollow (perceived only from the line that follows its periphery)
    a "hollow" bell at rest
    a "hollow" bell that is tilted so it appears to be in a ringing position
    I found one glyph in the Wingdings set - $0054 - but it is a solid raindrop, and what I wanted, was just a periphery.
    But maybe I have missed something somewhere. I am pretty new to the world of the Macintosh (and, no, I have virtually no experience with PC compatibles). Is there a utility in the developer's kit somewhere that lets people take a Unicode or Glyph out of a table somewhere, and sketch them into different kinds of designs or patterns? If there is, what is its name, and where would I find it?

    Tom Gewecke wrote:
    maybe you can suggest a character editor that can do what I was talking about?
    As I said, FontForge (free). Not-free: http://www.fontlab.com
    Okay.
    I've also been looking for a really good Ess-zet symbol (for the obsolete "ss" symbol in German)
    What do you mean exactly? you can get ß via Option + s.
    And depending on your wordprocessing software, it comes out ugly or pretty, depending.
    Can you suggest a Unicode for a hollow raindrop?
    Character Palette shows everything in Unicode. If you can't find it, it doesn't exist.
    Character palette won't take it out of the font, though. (Was I imprecise in my original post? I thought I was implying the extraction of the binary shape, minus the metadata that represents margins and ascenders and descenders, and logical curve information, or mathematical formulas of that nature, and the color information, what there is of it: I am dealing with a black and white medium - a sheet of paper and a black and white laserprinter, where all those colors simply go to waste.)
    The bottom line, here, is that neither the fonts that came with my Mac mini, nor the Unicodes, what there are of them, have a hollow raindrop, or a bell that is at rest, or in a tilted state, exist, so I guess I should go ahead and scope out FontForge. (I still think that Apple should have included something like that in the Mac mini I bought a year ago.)

  • Help: send unicode text using sockets

    Hi,
    I am trying to send unicode text to a native app using sockets. My test code looks like this
    Socket socket = new Socket(m_serverHost, m_hostPort);
    OutputStreamWriter out = new OutputStreamWriter(socket.getOutputStream(), "UTF-8");
    InputStreamReader reader = new InputStreamReader(socket.getInputStream(), "UTF-8");
    BufferedReader in = new BufferedReader(reader);
    // receive response to connect
    byte[] rc = new byte[4];
    int i = 0;
    while (i < 4)
    rc[i++] = (byte) in.read();
    String text = new String("Hello");
    out.write(text);
    // receive response to "hello"
    i = 0;
    while (i < 4)
    rc[i++] = (byte) in.read();
    My test program is connecting to the server socket but the server does not seem to understand the text that I send.
    Please comment if I am doing anything wrong or advice if you have any different ideas.
    Thanks,
    nallamos

    Try using the following output and input streams.
    out = new DataOutputStream(
    new BufferedOutputStream(
    s.getOutputStream()));
    in = new DataInputStream(
    new BufferedInputStream(
    s.getInputStream()));
    When you send the data send it using
    out.WriteBytes(message)

  • Help About Unicode ?

    Hello All,
    i want to use unicode.
    But i dont understande How can i use it in my programe.
    i want i make an application in which user select any lenguage
    name and after that whatever he write in JTexField, that is writen
    in selected language.
    Please any body tell me How can i do that and if any example.
    i m thanksfull.
    Arif.

    Hi
    There are two issues (at least here to consider).
    As the previous post mentioned, a user of a Chinese, Japanese or Korean computer with a native OS will be able to type into your application in his/her own native langauge correctly. Java stores characters as unicode by default, so you don't need to worry. Incidentally, the shape of the keyboard, layout etc is irrelevant, as foreign (sorry, foreign to me) users will normally be using an Input Method Editor to type into the program. i.e to type the Japanese character �l (if you haven't got Japanese fonts you won't see that), the user would type hito, hit space bar and enter.
    The difficulty arises where a non native OS is used, e.g. a US or UK user trying to type Japanese/Chinese/Korean etc. Java supplies an Input Method Framework, but it doesn't work on non native OS's, so you can't use it to type CJK on a US or UK operating system.
    I would suggest the alternative of using a web based front end, using HTML, JSP etc, which has the encoding set to UTF-8. This can then be used to allow for characters of to be entered into your program in unicode, and by-passes the IME problems, but, to have the characters correctly displayed in a Java app (not the web page), you must have the fonts installed for the relevant language, and also ammend your font.properties file within the Java lib directory.
    Have a search on the API documentation for Input Method Framework, and it will give you some hints and tips as to how you should ammend your properties file for non native OS's.
    For languages such as French, German etc, you should be OK without any ammendments (I think!!).

  • ** Plz help me in displaying unicode character **

    Hi,
    I hava a problem with the following code. Actually I want to display some arabic character with the help of unicode. Plz go through the following code.
    import java.awt.*;
    class Unicode extends Frame
    public static void main(String args[])
    Frame f = new Frame("Unicode");
    f.setSize(200,200);
    String str="\u0600";
    TextField tf=new TextField(str);
    f.add(tf);
    f.setVisible(true);
    I m trying to print that character on a textfield. However, this is not the requirement but for only testig purpose. I get the character '?' in the resulting textfield. plz tell me that how can I use unicode to print other languages character anywhere like on awt, swing or in html. plz reply soon . Thanks
    Fahad Ahmed

    \u0600 is an unassigned Unicode character, so there's no way to do that. However I assume you mean you want to display Arabic characters such as \u0627, Arabic Letter Alef (&#x0627). Then you need to find a font that can render those characters properly, and assign that font to the TextField using its setFont() method.
    I notice you are using AWT, which probably means you are trying to do this in an applet. If that's the case then "find a font and use it" is going to be a big problem, because you don't know what fonts your clients' computers have available.

  • Unicode conversion problem : File Separator

    Hi,
    I need help regarding Unicode conversion error for SAP program. In one program, I need to change the data type which is not unicode compatiable. Can anyone please help me to change the type, which i mentioned below :
    <b>constants: c_fs_delimiter  type x value '1C'.</b>
    concatenate
    <f1>
    <f2>
    into str separated by <b>c_fs</b>.
    Thanks,
    Yogita

    Have a look at CL_ABAP_CHAR_UTILITIES - this has a lot of separators like this pre-defined as attributes.
    SO to use TAB character,  code:
    concatenate
    <f1>
    <f2>
    into str separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    Andrew

  • UPGRADE 4.6C to ECC 6.0 is done / how could I Start the Unicode

    HI Guys,
    we upgraded successfully our 4.6 C (MDMP) to ECC 6.0 (<b>NON Unicode</b>).
    Could you please say  if I had this understand right:
    if I would like to start now the unicode conversion, I need this DVD "SAP NetWeaver 2004s Installation Export DVD" and there is "sapinst" that started the conversion to ECC 6.0 UNICODE.
    Is that right ?
    Of course if you have any documentations that could be helpful, I were very thankful.
    My email is [email protected]
    Regards,
    Alessandro

    Hello Alessandro,
    Before you do anything, please find the documentation as in note 551344.
    Read the complete Unicode Conversion Guide (UCG) before starting to
    prepare the conversion procedure. You can download the applicable
    document version  from this Note or from SAP Service Marketplace at:
    http:// service.sap.com/unicode@sap -> Unicode Library -> Unicode
    Conversion Library. Here you will also find additional documentation,
    overview presentations, other help material, Unicode-related SAP Notes
    and useful links as well as information about current developments.

  • Accents not appearing correctly in Safari

    I'm having a problem where accent marks in webpages are showing up as symbols like this
    Benoît XVI exhorte les jeunes à "ouvrir leurs coeurs à Dieu" - 23 minutes ago
    Le Polisario libère ses derniers prisonniers de guerre marocains - 23 minutes ago
    Le Groenland va limiter la chasse à l'ours blanc, victime du réchauffem
    I tried changing the encoding from western but it doesn't help. the unicode makes the accents appear correctly but the english doesn't always appear correctly. IE and Netscape show the text correctly. Any suggestions? Thanks for your time

    Could you send me a screenshot of an example where the accents are OK but the English is not when using UTF-8 encoding? Also an example URL? Click on my name for the address.

  • Nasty ID3V2 tag bug

    This is for any of the Apple team. I discovered a pretty bad ID3V2 bug in iTunes for Windows, 6.0.4.2.
    It has to do with the way the frame data length is encoded, or rather, in this case, not encoded. The result is that any tag data>127 bytes in length will likely break the entire tag.
    The length of the data for a 2.4 version tag is the first 4 bytes after the ID field(TPE1, TIT1, etc). These bytes are syncsafe, meaning that the highest bit is always 0. So each byte actually encodes 7 bits. I had a frame that was 467 bytes in length. Its length was stored as "0x01d3". That equals 467. But it is supposed to be sync-safed, so it should actually be 0x0363. As a result, 0x01d3 actually decodes to only 211 bytes. When a tag parser jumps 211 to what should be the next tag, t'aint nothing there! So all subsequent frames are then lost.
    This can get pretty nasty on Unicode tags which can then only store 64 characters before it breaks things.
    iTunes and presumably the iPod and any other Apple supplied tools will probably read that data correctly as I am assuming they use a common library. But...it will break any third party tools. Not good.
    Mac Mini   Windows XP Pro  

    This is quite possibly the most annoying iTunes/iPod bug, and it's still kicking around in the latest iTunes version.
    Note that all ID3v2 frames found in the tag prior to a frame with length greater than 127 bytes are read just fine. Once iTunes hits the syncsafe integer it gets lost.
    ID3v2 frames can appear in the tag in any order. This means if you have a tag editor that lets you specify the order the frames appear in the ID3v2 tag and set it to put all frames which are "most likely" to be larger than 127 bytes (e.g. APIC, TIPL, TMCL), you can at least get iTunes/iPod to recognize a larger subset of the information. But granted, as you stated, that doesn't really help the unicode case.
      Windows XP  

  • Change character set settings & character set.in infopackages

    hello Experts
    Because of Unicode, I need to change in all of the BW infopackages : character set settings & character set.
    Do you know a way to customize globally all the infopackages... or i have to do it manually on all of them.
    thanks for help!
    Dev

    Hi,
    Following links may help in UNICODE conversion of SAP BW :-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fdbedb90-0201-0010-4483-b64ac397986a?QuickLink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/unicode/ChallengesinBIUnicodeconversion
    Also go through  SAP Note 888210.
    In short you can change the UNICODE settings globally for all the source systems through SM59.
    Double click on the source system name.Goto MDMP & UNICODE tab and selct radio button UNICODE from there and save it. Do it for all the source systems connected with your BW system which are UNICODE compliant even the self connecting source system.
    After that you will not need to do any changes in the IP.
    Navesh
    Edited by: navsamol on Dec 12, 2011 1:55 PM

  • Can someone help me understand how ePub CSS @fontface Unicode characters are supported in td , but not in div or other elements?

    Hi,
    I'm working on a project to convert several hundred thousand life sciences articles into epub format, and we have run in to a problem with character entities.
    Being that these are scientific articles, the characters are from a wide range of Unicode charts, and are essential to transmitting the meaning of the data.
    The problem is that in my epub, the character entity inside a table data cell is rendering the @font-face correctly, but inside any other HTML element, the character renders as an empty box on our ipad2s.
    I've placed pre tags in hopes that the unicode will not be rendered in your browser here. The code point in this example is x1d542 just in case.
    So inside div, we see boxes, inside td, we see the character rendered properly.
    <pre>
          <div class="stix">Let &#x1d542; be a field, which will be either the complex numbers &#x02102; or the finite field &#x1d53d;</div>
          <table id="t31" rules="all">
            <tr>
              <td>&#x1d542;</td>
              <td class="stix">&#x1d542;</td>
              <td>U+1D542 MATHEMATICAL DOUBLE-STRUCK CAPITAL K </td>
            </tr>
    </pre>
    My CSS looks like this:
    <pre>
    @font-face {
        font-family: 'STIX';
        src: url('STIX-Regular.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
        unicode-range:  U+02B0-02FF, U+07C0-07FF,  U+0900-097F,U+0F00-0FD8, U+1D00-1D7F, U+1D80-1DBF, U+1D400-1D7FF, U+1E00-1EFF, U+1F00-1FFE,U+2000-206F, U+20A0-20B8, U+20D0-20F0, U+2300,23FF, U+25A0-25FF, U+2600-26FF, U+27C0-27EF, U+27F0-27FF, U+2900-297F, U+2A00-2AFF, U+2B00-2B59, U+2C60-2C7F ;
    @font-face {
        font-family: 'STIX-Math';
        src: url('STIXMath-Regular.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
        unicode-range:  U+02B0-02FF, U+07C0-07FF,  U+0900-097F,U+0F00-0FD8, U+1D00-1D7F, U+1D80-1DBF, U+1D400-1D7FF, U+1E00-1EFF, U+1F00-1FFE,U+2000-206F, U+20A0-20B8, U+20D0-20F0, U+2300,23FF, U+25A0-25FF, U+2600-26FF, U+27C0-27EF, U+27F0-27FF, U+2900-297F, U+2A00-2AFF, U+2B00-2B59, U+2C60-2C7F ;
    .stix   {
            font-family: "STIX", "STIX-Math", sans-serif;
    </pre>
    Is it possible that this is a rendering bug, because the character is rendering in the table cell, but not in other elements?
    Have I missed something obvious?
    Thanks,
    Abe

    I assume you are including the STIX font as part of your epub files?     
    Perhaps the folks who do this blog might be able to help -- they have done some work with font embedding:
    http://www.pigsgourdsandwikis.com/2011/04/embedding-fonts-in-epub-ipad-iphone-an d.html

  • 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

Maybe you are looking for

  • How to call an OBIEE report from EBS

    Hi, I'm trying to call an OBIEE report from an EBS menu. I have setup the following form function calling SSWA jsp type function Web HTML OracleOasis.jsp?mode=OBIEE&function=Go&Path=/shared/APA%20Real%20Time/AR/AR02%20Revenue%20by%20Account%20Report&

  • Creation of New Message by Customer - No Long Text

    I am creating test messages as an end-user in our Service Desk. After I send the message and review it, the long text has disappeared. Has anyone else experienced this? Thanks. Jackie

  • How to track multiple documents across different sites

    What I am trying to do seems relatively simple yet I can't seem to find a way to do it. I have found methods to track documents relative to me and recently modified documents within a specific site. Basically I want to take document A from the Develo

  • Problem in IP10 with the date of the task list

    Hello all!!!!! I have a problem when I'm duplicating a task list. I can duplicate the task list correctly, then i assign it to a generated maintance plan ( I'm only changing the plnal field because i'm changing the center of the task list). Then I go

  • Cannot compile db2 application [SOLVED]

    OK ppl i really need your help. I'm trying to compile a db2 program. I have a sqc file. I have done: db2 prep 13.sqc bindfile db2 bind 13.bnd gcc -I$DB2DIR/include -I~/sqllib/include -c 13_01.c and then when i try to do: gcc -o program 13_01.o -Wl,-r