UTF-8 Support for jsp/Struts /xslt/xml/oracle/tomact5

Posted on 2009-02-24
Last Modified: 2013-11-24
Hi Experts,
May I know the all the setting require for web application develop for all UTF-8 using  
jsp/Struts /xslt/xml/oracle/   technology.

Question by:Dehankar
    LVL 19

    Expert Comment

    java does support UTF-8. not sure what you are looking for here..

    It really depends what all elements you will have in your app..

    i.e. in Oracle, you can set the default encoding to be UTF-8 ( you can do that when you create the instance of your database)..

    In Java you can set the encoding whenever you are dealing with strings/files etc..

    Author Comment

    I am using struts framework. whenever I take Input from jsp for valid utf-8 char like ó| ...I get
    óż this.
    I have tried
    1)new String(str.getBytes("UTF-8")) ;
    new String(srt.getBytes("")) ;
    also but dosent work
    if I tried
    byte[] stringBytesISO = srt.getBytes("ISO-8859-1");
                           test = new String(stringBytesISO, "UTF-8");
    this works, but whem i write xml(for UTF-8) which uses this string ITS NOT WORK.
    it work only for  xml(for ISO-8859-1) i.e. obvious.
    how do i ristrict user to avoid insert non- utf-char....
    please help

    LVL 19

    Accepted Solution

    on your jsp at the top you can put response.setCharacterEncoding("UTF-8")..

    the client's machine may still have its own encoding & you cant really do much to change that..

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Title # Comments Views Activity
    how to disable hibernate query cache 2 52
    fizzArray  challenge 1 28
    has12 challenge 13 52
    sumHeights  challenge 17 50
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now