Problem in Encoding of English character

I am getting the unicodes of non english characters in my action classes after submitting my JSP page using UTF-8 encoding. How can I get the unicodes for english characters in the action class after submitting my JSP?

Hi,
try using the fm SPELL_AMOUNT
with language key AR so that you wil get your desired output.
Regards,
Madhumahesh

Similar Messages

  • Getting a request in a non English character

    Hi ,
    In an attempt to solve a problem of getting a request in a non English character , i use the code , taken from O'Reilly's "Java Servlet programing" First edition:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class MyServlet extends HttpServlet {
         public void doGet(HttpServletRequest req, HttpServletResponse res)
                                                                               throws ServletException, IOException {
              try {
                                                      //set encoding of request and responce
         req.setCharacterEncoding("Cp1255"); //for hebrew windows
         res.setCharacterEncoding("Cp1255");
         res.setContentType("Text/html; Cp1255");
         String value = req.getParameter("param");
                                                      // Now convert it from an array of bytes to an array of characters.
         // Here we bother to read only the first line.
                                                      BufferedReader reader = new BufferedReader(
         new InputStreamReader(new StringBufferInputStream(value), "Cp1255"));
                                                      String valueInUnicode = reader.readLine();
              }catch (Exception e) {
              e.printStackTrace();
    this works fine , the only problem is that StringBufferInputStream is deprecated .
    is there any other alternative for that ?
    Thanks in advance
    Yair

    Hi Again ..
    To get to the root of things , here is a servlet test and an http client test which demonstrates using the above patch and not using it :
    The servlet :
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.io.StringBufferInputStream;
    public class Hebrew2test extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
              request.setCharacterEncoding("Cp1255");
              response.setCharacterEncoding("Cp1255");
              response.setContentType("Text/html; Cp1255");
              PrintWriter out = response.getWriter();
              String name = request.getParameter("name");
              //print without any patch
              out.println(name);
              //a try with patch 1 DEPRECATED
              out.println("patch 1:");
              BufferedReader reader =
              new BufferedReader(new InputStreamReader(new StringBufferInputStream(name), "cp1255"));
              String patch_name = reader.readLine();
              out.println(patch_name);
              //a try with patch 2 which doesn't work          
              out.println("patch 2:");
              String valueInUnicode = new String(name.getBytes("Cp1255"), "UTF8");
              out.println(valueInUnicode);
    and now for a test client :
    import java.io.*;
    import java.net.*;
    public class HttpClient_cp1255 {
    private static void printUsage() {
    System.out.println("usage: java HttpClient host port");
    public static void main(String[] args) {
    if (args.length < 2) {
    printUsage();
    return;
    // Host is the first parameter, port is the second
    String host = args[0];
    int port;
    try {
    port = Integer.parseInt(args[1]);
    catch (NumberFormatException e) {
    printUsage();
    return;
    try {
    // Open a socket to the server
    Socket s = new Socket(host, port);
    // Start a thread to send reuest to the server
    new Request_(s).start();
    // Now print everything we receive from the socket
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream(),"cp1255"));
    String line;
    File f = new File("in.txt");
    FileWriter out = new FileWriter(f);
    while ((line = in.readLine()) != null) {
    System.out.println(line);
    out.write(line);
    out.close();
         catch (Exception e) {
    e.printStackTrace();
    class Request_ extends Thread {
    Socket s;
    public Request_( Socket s) {
    this.s = s;
    setPriority(MIN_PRIORITY); // socket reads should have a higher priority
    // Wish I could use a select() !
    setDaemon(true); // let the app die even when this thread is running
    public void run() {
    try {
                        OutputStreamWriter server = new OutputStreamWriter(s.getOutputStream(),"cp1255");
                        //String query= "GET /userprofiles/hebrew2test?name=yair"; //yair in Englisg ..
                        String query= "GET /userprofiles/hebrew2test?name=\u05d9\u05d0\u05d9\u05e8"; //yair in hebrew - in unicode
                   System.out.println("Connected... your HTTP request is sent");
                        System.out.println("------------------------------------------");
                        server.write(query);
                        server.write("\r\n"); // HTTP lines end with \r\n
                        server.flush();
                        System.out.println(server.getEncoding());
         server =      new OutputStreamWriter(new FileOutputStream("out.txt"),"cp1255");
                        server.write(query);
                        server.flush();
    catch (Exception e) {
    e.printStackTrace();

  • Reading a non-english character

    Hi, I have a trouble with reading a non-english character from a html page.
    I'm taking the word from the html page, and compare it with itself,
    like this
    string.equals("B&#304;TT&#304;")
    but it returns false.
    is it possible to correct this?

    specify an encoding for your inputstream reader:
    BufferedReader in = new BufferedReader(
                new InputStreamReader(new FileInputStream("infilename"), "8859_1")); for example

  • Problem with the Non-English Characters

    Hello,
    I have been using Adobe Illustrator  but I have a huge problem with the non-english characters with Standart Fonts. With the Professional font's I have no problem with them. But when I'm using any standart font in font folio library I cannot type any "ğ-İ-ş". I can add those letters in fontlab with the glyphs (scedilla, idotaccent, gbreve). Most of the fonts have those letters already prepeared so I dont even have to redraw. But I can't add those glyph to every single font because I dont have that kind of time and patience. Is there any better solution for this? Or is there any font folio pack that all fonts are PRO.
    I'm looking forward for your answers
    Thanks.

    Joel wrote: I'm told that this is the exact difference between Adobe's Standard and Pro fonts — the Pro fonts have additional glyphs, including those necessary for extended Latin script.
    Exactly. The Pro fonts have at a minimum the Adobe Western 3 character set, which is essentially western European + Adobe CE.
    > Standard fonts just have the basic English character set, with maybe a bit of help for Spanish and French.
    A lot more than that!
    > You're doing Turkish, right? Adobe's coverage for Turkish in its fonts is not great - some of the Pro fonts have Turkish coverage, many do not.
    This is false. Every single Adobe Pro font supports Turkish.
    To be clear:
    All Adobe Standard fonts support the following languages: Afrikaans, Basque, Breton, Catalan, Danish, Dutch, English, Finnish, French, Gaelic, German, Icelandic, Indonesian, Irish, Italian, Norwegian, Portuguese, Sami, Spanish, Swahili and Swedish.
    Adobe Pro fonts support those languages, plus AT LEAST: Croatian, Czech, Estonian, Hungarian, Latvian, Lithuanian, Polish, Romanian, Serbian (Latin), Slovak, Slovenian and Turkish. Some Pro fonts have more language support than this, such as Greek and/or Cyrillic, and additional extended Latin.
    See: http://www.adobe.com/type/browser/info/charsets.html
    Cheers,
    T

  • Error when import file with non-english character

    Hi,<br /><br />I have images file with non-english character (unicode), for example ABC<X>.png where <X> is non-english character such as japanese, chinese, etc.<br /><br />Whenever I want to import the file to After Effects (right click -> import -> file), I always encounter error:<br /><br />Finding file/dir info for the file "C:\...\ABC?.png" -- file not found (-43) (3::30)<br />Can't import file "ABC?.png": unsupported filetype or extension. (0::1)<br /><br />My PC is Windows XP Professional 2002 SP2 English.<br /><br />How to solve this problem?<br /><br />Thanks

    Adjust your system language settings. Proper file name conventions require a consistent Unicode environment, so install the respective foreign language support files or switch the language system-wide. Mixing different zones/ code ranges is always a bad idea. If your system is not in Japanese, AE will always misinterpret the characters and refuse to import. If that's not feasible, simply rename the files.
    Mylenium

  • I do input in urdu Language but get English Character Why??

    i take input in JtextField in URDU language(Pakistan National Language) by the help of
    this.jTextField1.setFont(new java.awt.Font("URDU", 1, 13));user do input in text filed its display correctly.
    but WHEN i get in programme it return  English Character..
    JOptionPane.showMessageDialog(this, this.jTextField1.getText());give me some clue....

    i changed it by the help of under code , but my problem is sitll...
           Locale locale = new Locale("UR", "PK");
            String l = locale.getISO3Language();
            UIDefaults d = new UIDefaults();
            d.setDefaultLocale(locale);any other idea???????????

  • A wierd problem while encoding URLs

    Hi all,
    I'm facing a wierd problem with the java.net.URLEncoder class. The encode function in this class is used for encoding URL based on standards like "UTF-8" etc..
    I need to encode the URLs, because i have to send this information in a XML to another server.. Here's what the URLEncoder is doing if i give it the URL
    http://mydomain.com:80/myServlet?_fileName=filename.mp3&_useStreaming=true
    its encoding this as
    http%3A%2F%2Fmydomain.com%3A80%2FmyServlet%3F_fileName%3Dfilename.mp3%26_useStreaming%3Dtrue
    but, all I wanted is to encode only '&' character ( as XML misinterprets this character with schemes ).
    So, my question is .. is there any way that i can selectively encode the characters in the URL?
    Any help wud be appriciated in this regard. :-)

    I accept what you are saying.. URLEncoder encodes any string that's passed to it..
    I infact have two different problems in hand.. The reason i mentioned only one above is because the solution to the first problem cud as well solve the second.. Anyway, here's the second problem ...
    I'm recieving an XML from a server, where i get the URL info and i have to download the CONTENT from that URL.. Sample xml is given below
    <Music>
    <Singer>Tata Young</Singer>
    <contentURL>http://myMusic.com/sexy naughty.mp3</contentURL>
    </Music>
    if you see the URL in the xml, that infact contains spaces in it.. I have my logic which checks if the given URL is a absolute URL or relative URL
    if( relative URL)
    I append "http://domain name:" stuff to make it absolute
    else
    i connect to the URL directly to get the Content
    I'm using
    URI i = new URI(str);
    i.isAbsolute() method to determine whether its a absolute URL or not..
    but this method doesn't seem to work for URLs that have spaces in them.. So, i encoded the URL and tried passing it to the method.. but it still doesn't work..
    I probed into URI class itself and found out to my amazement that URI class assumes that URL contains only alpha numeric characters and few special characters like '+' , '/' , ':' etc..
    Since the encoded URL has '%' character in it.. its not able to say that its a absolute URL.. Tht's the reason I asked for selective encoding.. ( say, which encodes only [space] character)..

  • How to validate for non-english character on a single line text field

    In a "Single Line Text" field we would like to allow the users to enter alpha numeric values only. We should show error when the user enter non-English values like
    carácter
    Vijayaragavan, MCTS

    Hi,
    According to your post, my understanding is that you wanted to validate for non-english character on a single line text field.
    I recommend to use jQuery to attach regular expression validation. Please refer to:
    Using #jQuery to attach regular expression validation to a #SharePoint list form field
    In addition, for custom validations you can create your own Types. Refer to
    this[^] for creating custom field type
    More information:
    SharePoint Custom Field - Regex Validator
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Does querybuilder support non-english character?

    I want to make query using querybuilder with non-english character (Chinese)?
    I tried with http://localhost:4502/libs/cq/search/content/querydebug.html but it is not working.
    below is my query string:
    property=contenttext
    property.value=&#20320;&#22909;&#21966;
    I have converted the chinese character (你好嗎)to unicode.
    Can anyone help me?

    That's a bug in the debugger UI. But it's easy to fix:
    in crxde lite, overlay /libs/cq/search/components/querydebug/querydebug.jsp by copying it to /apps/cq/search/components/querydebug/querydebug.jsp
    open /apps/cq/search/components/querydebug/querydebug.jsp
    find the line "props.load(new ByteArrayInputStream(queryParam.getBytes("ISO-8859-1")));"
    and replace with "props.load(new StringReader(queryParam));"
    Will be fixed in 5.6.1.

  • Report not output ENGLISH character

    hi,
    im using 12.1.3,
    recently just did a customization report. but the report not output in English character, instead it outputs in Greek or Symbol font in PDF.
    i can see the ENGLISH output if i run it in REPORT BUILDER.
    my app server is RED HAT 5. I have configured the printer correctly
    anything that i need to configure?

    Hi;
    Please check below notes:
    How to Setup Pasta Quickly and Effectively [ID 356501.1]
    Also see:
    R12-Pasta option
    PASTA FOR R12
    Regard
    Helios

  • Problem when passing non English text to another amx page

    Hi,
    I'm using JDeveloper version 11.1.2.3.0 under windows 7, to deployed ADF Mobile application into android device,
    when i used the application to pass 3 input text value to another page (or object)
    i note that if passed the 3 text without any English character (means just Arabic,Urdo,Farsi ...)
    the next page will received only the last text and the others will be null
    that means the other texts Value Change Listener dose not work, they will work just in one case if i used English
    or any other special Character (Space bar, Back Space ...) in order to invoke that action
    Any help plz
    Note:- when i deploy it to iPhone device it is work fine
    Edited by: user2397713 on Jun 5, 2013 3:11 PM

    Hi,
    do you have a test case and instructions for me to try and run. Just create a simple page-to-page use case and send it in a ZIP file (renamed to ZIP) for me to test on 11.1.2.4 and file a bug if required. If you have a support contract, you can file a service request with support. My mail addres sis in my OTN profile, just click my name link.
    Frank

  • Experiencing the problems while encoding the barcode with Code 128 font

    Hi Tim,
    Hope you are doing good.
    We are experiencing the problems while encoding the barcode with Code 128 font.we have followed the Oracle BI Publisher Blog i.e Barcoding 102 http://blogs.oracle.com/xmlpublisher/discuss/msgReader$281.
    Before applying the encoding Java class we were able to display the barcode but after applying this encoding Java class we are not able to display the barcode.
    We are requesting you to help us for encoding the barcode with Code 128 font and read barcode by scanner.
    We will appreciate and thankful if anybody help us in this regard
    Thanks,
    SubbaRao.

    Hi Tim,
    I am trying to create 128 Barcode, output shows little junk characters. I followed the your "Barcoding 102 instrucitons but no luck. I apprciate your help if you provide some help on this.
    http://blogs.oracle.com/xmlpublisher/2006/06/06
    1. Created Java class under $JAVA_TOP/oracle/apps/oracle/xdo/template/util/barcoder
    2. Registeted and applied the format the barcode to the form field. I will sedn my XML, RTF and Java class, Would you pleae advice me on this
    Thanks
    Venu

  • Translation problem , While conversion from English to Poland

    Hello Gurus
    Pl suggest  Translation problem , While conversion from English to Poland  getting message
    "Code page not found for Poland "
    Code page 1401 exits in system
    SAP version 4.6C
    Best regards
    Krish

    Dear Vamsi,
    Please check the below lonk may be it heps.
    Translation to different languages. How??????
    Regards
    Pranay

  • N91 problem sending SMS with non English character...

    Hello I own a N91 4GB version. I have upgraded to version 2.20.008. I checked recently and have not found a newer version available for download.
    When composing an SMS a counter appears on the upper part of the screen, which shows how many characters remain and how many SMS(s) will be sent.
    When I use my native language, i.e. Greek, the counter starts as usual with 160 characters. When I type the first character it drops to 69 characters and then it works correctly decreasing the counter by 1. The result is that the phone sends more than 1 SMS even if there are no more than 160 characters.
    The problem does not appear if I use English characters.
    Is there a way to fix this? Do other users have the same problem?

    Hello alsanico,
    I'm from Greece too.
    I haven't seen N91's exact menu but i suppose it has similarities with my N95. They both run S60.
    Settings-
    General-
    Personalisation-
    Language-
    Writing Language-Ellinika
    If you have already made these settings then go to:
    Messaging-
    Options (left selection key)-
    Settings-
    Text Message-
    Character encoding-
    Reduced support
    Hope this helps...

  • Non-English character problem in Oracle 10g Express Edition

    Hi There;
    I have a table. It's name is INSTITUTION. It has a NUMBER INS_ID and NVARCHAR2(50) INS_NAME . INS_NAME can contain Turkish characters, such as "ğ,ü,ş,ç,ö". According to business logic, there can not be a repetition on the INS_NAME.
    User will enter institution name from a textbox in ASP.NET , and I check this name in database from c sharp code, if there is no repetition, we will add this record.
    The problem is; when user enter a instition name that contains Turkish character, there is a duplication. If there is a instition name is *"su işleri"* , the both query; SELECT * FROM INSTITUTION WHERE INS_NAME = *'su işleri'*; and SELECT * FROM INSTITUTION WHERE INS_NAME = *'su isleri'*; returns no result, even though there it is.
    But if instition name is "oracle corporation" (there is no Turkish character) it query successfully. I have the same problem in Toad for Oracle 11.5.1.2. When I query database from toad SELECT * FROM INSTITUTION, the phrase *"su işleri"* has appeared. But when I query SELECT * FROM INSTITUTION WHERE INS_NAME = *'su işleri'*; , there is again no result.
    When I connect oracle database directly and perform the query SELECT * FROM INSTITUTION , the phrase *"su isleri"* (not *"su işleri"* ) has appeared.
    Here are the language settings of the database:
    National Language Support
    National Language Parameter Value
    NLS_CALENDAR______________GREGORIAN
    NLS_CHARACTERSET__________WE8MSWIN1252
    NLS_COMP__________________BINARY
    NLS_CURRENCY______________TL
    NLS_DATE_FORMAT__________DD/MM/RRRR
    NLS_DATE_LANGUAGE________TURKISH
    NLS_DUAL_CURRENCY_________YTL
    NLS_ISO_CURRENCY__________TURKEY
    NLS_LANGUAGE______________TURKISH
    NLS_LENGTH_SEMANTICS______BYTE
    NLS_NCHAR_CHARACTERSET___AL16UTF16
    NLS_NCHAR_CONV_EXCP______FALSE
    NLS_NUMERIC_CHARACTERS____ ,.
    NLS_SORT___________________TURKISH
    NLS_TERRITORY______________TURKEY
    NLS_TIME_FORMAT____________HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT_______DD/MM/RRRR HH24:MI:SSXFF
    NLS_TIMESTAMP_TZ_FORMAT____DD/MM/RRRR HH24:MI:SSXFF TZR
    NLS_TIME_TZ_FORMAT__________HH24:MI:SSXFF TZR
    How can I resolve that problem? Thanks in advance.
    Edited by: 963344 on 05.Eki.2012 01:00
    Edited by: 963344 on 05.Eki.2012 01:01
    Edited by: 963344 on 05.Eki.2012 01:06

    This type of question/discussion belongs in {forum:id=50} forum.
    Very recently a thread there touched the topic of Turkish character support.
    Please read it: Western European Characterset to Turkish in sql
    >
    NLS_CHARACTERSET__________WE8MSWIN1252 Check the character set repertoire of win-1252 (look for the typical turkish language characters you've mentioned above).
    http://msdn.microsoft.com/en-us/goglobal/cc305145.aspx
    Look at character names, such as "... letter s with cedilla".

Maybe you are looking for

  • Problem in generating excise invoice with reference to commercial invoice

    Hi, I could able to generate excise invoice with reference to STO ( jex ) invoice but unable to generate with reference to commercial invoice ( F2) .System is show 'error in creating FI document'.  Am i missing some configuration. Please advice Thank

  • How do I prevent attachments from embedding into email messages in Lion on an Exchange Server?

    I work in an Exchange Server environment, one of only two Macs in a building filled with Windows machines. When I was using Snow Leopard, I had to send attachments to my fellow workers using the same mail server via plain text messages, so that the a

  • Photoshop update in Adobe Creative Cloud fails

    Each time I open Adobe Creative Cloud there is an update for Photoshop. When I click on the update it is downloaded and the install process starts. When the installation of the update reaches 100%, the update always fails saying install error. Any id

  • How to save configuration files.

    Hello. For a project at school I have to write have to write a configuration System. Our project should work on Unix and Windows so my question is. How i can determinate the path where to save our configuration file? under unix it shuld be saved as /

  • Conditional checkboxes

    I have a list of options available on a spreadsheet that are selectable via a checkbox. Can I set up a conditional rule that if a certain checkbox is checked, then another is automatically checked? Column A has the options, Column B has the price, an