JSP - How to Truncate or replace non-english inputs ?

Hi,
I have a JSP form in which users needs to input certain values and those values get stored in our database. Now my concern is that many a times users from different part of geographies also input non-english values which comes as weired characters and gets stored in my database.
I do not want non english stuffs to be stored in my database.
What I want is that if user enters any NON-ENGLISH character then either it should get truncated or it should get replaced with its nearest matching english character.
How can I achieve this ?
Awaiting Help !
Thanks

Hey guyz..Iam awaiting ur response......is it something that not achievable....if thats so then please suggest me some way out

Similar Messages

  • How can the symbol and non-English diacritical marking, etc accessed with combinations of letters and functional keys prior to Snow Leopard be achieved in Snow Leopard?

    How can the symbol and non-English diacritical marking/punctuation pallet, available in pre-Snow Leopard OSes with various combinations of letter or number keys and functional keys, be accessed in Snow Leopard?  Those pre-Snow Leopard versions worked on the fly as one was making text in any pedestrian application and its native font (Mail, Text Edit, for example).  One didn't need to dig around in font libraries, change font preferences, etc.

    > One didn't need to dig around in font libraries, change font
    > preferences, etc.
    It hasn't worked like that since the Early Chalcolithic (ie, System 7 or thereabouts).
    You've already got plenty of answers. Briefly (and grossly oversimplified),
    - Mac OS X conforms to a standard known as Unicode; in its current incarnation, it defines over 100k characters.
    - A keypress is translated into a character according to the current keyboard layout.
    - The graphic representation of a character (ie, glyph), is provided by the current font.
    - If a font lacks a glyph for the requested character, either another font will be automatically chosen (Mac OS X text engine), or some form of feedback (empty box, question mark, etc) will be used.
    - To inspect the actual key codes, use a utility such as Key Codes.
    - To inspect the current keyboard layout, invoke Keyboard Viewer.
    - To inspect the full complement of glyphs of a font, invoke Character Viewer (also accessed with the Special Characters command).
    (Remember that both these utilities are resizable and zoomable -- you can enlarge them to a comfortable viewing size, then zoom out to see more of the screen for your original task.)
    - For a more detailed look, use a utility such as UnicodeChecker.
    - The default keyboard layout depends on your Mac OS X localisation.
    (Keep in mind that there's no need to stick with the default layout; choose whichever one makes sense to you, given your language, habits, and proclivities. Mac OS X comes bundled with quite a few, including some obviously designed for the huddled masses of refugees from the Dark Side, who, in their wretched ignorance, have the unmitigated gall of labelling our native ways "really uncomfortable". Oh well, this, too, shall pass.
    If none of the supplied keyboard layouts fits your needs -- if, for instance, you write your emails in Etruscan -- go out on the 'net, you'll find quite a few. Or write your own with Ukulele, it's not really all that difficult.)
    - Use Keyboard Viewer to familiarise yourself with the current layout and to enter the odd character; but, to be proficient, you should learn your layout to the point that KV is no longer needed.
    - Use Character Viewer to enter the odd character not available in the current keyboard layout.
    Neither Keyboard Viewer nor Character Viewer are effective tools for more extensive needs, eg, for writing and editing bilingual or multilingual texts. In such a case, you should enable the respective keyboard layouts and switch between them with a keyboard shortcut.
    A few interesting layouts bundled with Mac OS X have already been mentioned. Let me add three.
    - Dvorak: several layouts based on the Dvorak keyboard. It is claimed that the latter is more productive and lessens RSI risk.
    - US Extended: based on QWERTY, it offers a more extensive set of diacritics (eg, caron, breve) via dead keys.
    - Unicode Hex Input: also based QWERTY, it allows input by Unicode codepoint (in hexadecimal), so it's the most extensive layout of all; eg, to enter the character "Parenthesized Number Twelve" (U+247F), hold down Option, type "247f", release Option.

  • Non-english input in Wine[SOLVED]

    Hi,
    Non-english input characters in Windows apps under Wine appear either as blanks or as question marks. Any how-to is welcome .
    Meanwhile, I've googled an interesting advice (for Cyrillic):
    $ sudo ln -s en_US.UTF-8 /usr/share/X11/locale/ru_RU.UTF-8
    The most interesting part is a mystery: where am I supposed to create such a link?
    Last edited by Llama (2009-05-29 19:23:46)

    Peanut wrote:In other words, that command would overwrite the russian UTF-8 locale with an english UTF-8 locale. I can't see any reason why that should fix anything.
    For one thing, the ln command refused to overwrite anything . Yes, I've been curious about the reason.
    Peanut wrote:Have you:
    1) Installed and enabled fonts that support cyrillic characters?
    (1) ru_RU.UTF-8 alongside en_US.UTF-8:
    $ locale
    LANG=en_US.utf8
    LC_CTYPE="en_US.utf8"
    LC_NUMERIC="en_US.utf8"
    LC_TIME="en_US.utf8"
    LC_COLLATE=C
    LC_MONETARY="en_US.utf8"
    LC_MESSAGES="en_US.utf8"
    LC_PAPER="en_US.utf8"
    LC_NAME="en_US.utf8"
    LC_ADDRESS="en_US.utf8"
    LC_TELEPHONE="en_US.utf8"
    LC_MEASUREMENT="en_US.utf8"
    LC_IDENTIFICATION="en_US.utf8"
    LC_ALL=
    Peanut wrote:Have you:
    2) Tried using other encodings than UTF8?
    (2) No, I avoid non-UTF locales.
    Luckily, in this day and age the solution turned out to be fairly straightforward:
    Starting sequence:
    LANG=ru_RU.UTF-8 wine ...
    Aliasing, they say, is also possible :
    echo "alias wine='LANG=ru_RU.UTF-8 wine'" >> ~/.bashrc
    echo "alias wine='LANG=ru_RU.UTF-8 wine'" >> ~/.profile

  • Types of micro sd card + non english input language

    Hello all,
    I consider buying the Blackberry Passport but have a couple of questions. Please consider that I have never owned or tried a Blackberry before. Also it is not possible for me to try it out before buying it as they are not sold where I live.
    Which class of micro sd card is supported? I would like to buy the fastest 128 gb available and, as I understand it, that would be a UHS-II class 3. However it seems that this card has some physical changes to it compared the previous versions so I'm not sure it will work on the BB Passport.
    The physical keyboard has the disadvantages of not supporting non-english input. Will I be able to input non-english characters anyway? I imagine that they will appear at the top row of virtual keys, but I'm not sure.
    Kind regards
    Peter

    newer os supports exfat format
    not sure about a different format for faster Micro SD cards, have a link?
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • Replace non-english characters function

    Hi folks,
    I have a text which includes non english characters. Is there any trick, how can I replace those characters with "closest" english character?
    Examples:
    "Hytölä"  to become "Hytola"
    "Säynatsälo" to become "Säynatsälo"
    etc ...
    I was thinking about usage of REGEXP
    select regexp_replace('Hytölä Säynatsälo ', '[^0-9A-Za-z]', '') from dual
    but a pattern is not correct.
    Any suggesitons?

    There is something that smells like a hack for me (source: replace characters with accent with their base letter)
    However
    with data as (
    select 'Hytölä' str from dual
    union all
    select 'Säynatsälo' from dual
    select
      str
    ,utl_raw.cast_to_varchar2(nlssort(str, 'NLS_SORT=BINARY_AI')) nstr
    ,length(utl_raw.cast_to_varchar2(nlssort(str, 'NLS_SORT=BINARY_AI'))) l
    from data
    STR
    NSTR
    L
    Hytölä
    hytola
    7
    Säynatsälo
    saynatsalo
    11
    Notice that change in length through an extra null bit at the end of the strings.
    And the loss of the uppercase.
    For this kind of questions it's helpful to know about the requirements. Why there shuóuld be a baseletter conversion? For search purposes for example.
    not to forget the db characterset.

  • How to get correctly any non english data e.g greek data in servlet??

    Hello All,
    I have one textbox on form from where user will enter greek data and when i get that field data in servlet using request.getParameter("name") ,then it shows wierd text in servlet ,it ditorts all the characters that user enterd on page,how can i get greek data in servlet wothout losing it????
    Please help
    Thanks.

    1.) Read [this excellent introduction into Unicode|http://www.joelonsoftware.com/articles/Unicode.html]. The subject is more complex than you think.
    2.) Verify at each point in your program that your String contains the correct value. Note that using System.out.println() might not be helpful here, since the console might not be able to display those characters.
    3.) When a String contains invalid characters, then the error already happened before! Don't try to fix it after the fact, look where the original byte[]->String transition is made and make sure that it is correct.

  • SMS input box is covered by candidate bar when using non-English input. Any idea?

    Any idea if any get-around?
    Same for other apps too...

    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

  • Encoding non english characters with utf 8 on jsp (Critical!!)

    I am inserting hebrew characters from JSP into oracle db and everything is fine until this point. But when I try to retrieve the information from the database, the characters are not displayed properly (I get some garbage characters). I am sure that the data stored in the database is correct, but not sure why there is a problem in displaying the data in the JSP.
    I came across a thread on TSS
    http://www.theserverside.com/discussions/thread.tss?thread_id=28944
    and followed the suggestions given there like having
    <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">and also this
    <%
    //Some JDBC and sql statement query UTF-8 data and then ...
    String str = rs.getString("utf8_data");
    str = new String(str.getBytes("ISO-8859-1"),"UTF-8");
    %>
    <%= str %>Now, the data getting displayed is partly correct, I mean to say, some characters are still coming as squares.
    Any ideas will be of great help.

    even i doubt the database charset for this issue. But what I dont understand is how only certain hebrew characters are getting stored properly and why others are corrupted?
    Also, can anyone let me know how i can view the Non-English characters present in the database directly, as TOAD is not able to display them

  • Removing non-English characters from data.

    Ours is global system with some data with non-English characters. We want to download file by removing this non-English characters.
    Any suggestions how we can remove these non-English characters from file..?

    The FM u said
         Replace non-standard characters with standard characters
       Functionality
         SCP_REPLACE_STRANGE_CHARS processes a text so that it only contains
         simple characters. Special characters and national characters are
         replaced in such a way that the text remains reasonably legible.
         The character set 1146 is used by default. In this case the following
         replacements are made, for example:
          Æ ==> AE        (AE)
          Â ==> A         (Acircumflex)
          Ä ==> Ae        (Adieresis)
          £ ==> L         (sterling)
         Note that the new text can be longer than the old.
    So i dont think it ll be useful for eliminating the sp. chars.
    U have to check each and every alphabet with std 26 alphabets
    Thanks & Regards
    vinsee

  • Displaying non English file name in portlet

    Hi,
    I have a portlet that display all the files in a directory that is not on any of the Plumtree servers (portal, collaboration, etc ...). This directory could be a local directory or a directory on a network but not on any of the plumtree servers. How could I display a non English file in the portlet? I am using Plumtree portal 5.0.4J.
    Thank you so much in advance for the helps!

    Hi,
    I have a portlet that display all the files in a directory that is not on any of the Plumtree servers (portal, collaboration, etc ...). This directory could be a local directory or a directory on a network but not on any of the plumtree servers. How could I display a non English file in the portlet? I am using Plumtree portal 5.0.4J.
    Thank you so much in advance for the helps!

  • Removing non-english characters

    Hi,
    I'm trying to define a regular expression that helps me to replace non-english characters from a string.
    For example:
    BESANÇON
    and I need to get something like: BESANCON, or BESAN*ON.
    Could any one give me some hints?
    Max A.

    You can use the convert function:
    SELECT CONVERT('BESANÇON','US7ASCII')
    FROM dual;
    CONVERT(
    BESANCON
    1 row selected.

  • Reading and writing non-English files

    Hi there..
         I wonder if anyone can tell me how to read and write non-English language files like French or Arabic files...
    Im also interested in knowing how can i convert from Unicode to ASCII and vice versa..
         thanx.. Mourad

    hi there ..
    thanx for ur cooperation .. but actually i have tried the following code and it didnt work; so, im looking for more help :)
    esp. if there are any notes about the files themselves for example;
    by the way i used Notepad files in unicode format..
    my code is :
    import java.io.*;
    public class MainClass {
    public static void main(String args[]){
    String inputfile = "arabic.txt";
    String outfile = "outfile.txt";
    try{
    RandomAccessFile raf = new RandomAccessFile(inputfile, "r");
    InputStreamReader isr = new InputStreamReader(
    new FileInputStream(inputfile), "Cp1256");
    OutputStreamWriter osw = new OutputStreamWriter(
    new FileOutputStream(outfile), "Cp1256");
    for(int i=0; i<raf.length(); i++)
    osw.write(isr.read());
    osw.close();
    }catch(UnsupportedEncodingException uee){
    System.out.println("UEException: "+ uee.getMessage());
    }catch(FileNotFoundException fnfe){
    System.out.println("FNFException: "+ fnfe.getMessage());
    }catch(IOException ioe){
    System.out.println("IOException: "+ ioe.getMessage());
    thanx again..Mourad

  • Word Replacements for Non- English Characters

    Hi
    Does anyone have an idea on implementing Word Replacements for non- english characters in TCA- DQM 11i.
    We are trying to identify, capture and cleanse common accented characters like à, â , ê
    However, the default language for replacement is American English , So even if we add these in the existing lists it will not take any effect
    Is creating a new Word replacement list for every language the solution ?? any patch recommendations???
    Thanks in advance

    It seems that this is an issue that has popped up in various forums before, here's one example from last year:
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=490722
    This entry has some suggestions for handling mnemonics in resource bundles, and they would take care of translated mnemonics - as long as the translated values are restricted to the values contained in the VK_XXX keycodes.
    And since those values are basically the English (ASCII) character set + a bunch of function keys, it doesn't solve the original problem - how to specify mnemonics that are not part of the English character set. The more I look at this I don't really understand the reason for making setMnemonic (char mnemonic) obsolete and making setMnemonic (int mnemonic) the default. If anything this has made the method more difficult to use.
    I also don't understand the statement in the API about setMnemonic (char mnemonic):
    "This method is only designed to handle character values which fall between 'a' and 'z' or 'A' and 'Z'."
    If the type is "char", why would the character values be restricted to values between 'a' and 'z' or 'A' and 'Z'? I understand the need for the value to be restricted to one keystroke (eliminating the possibility of using ideographic characters), but why make it impossible to use all the Latin-1 and Latin-2 characters, for instance? (and is that in fact the case?) It is established practice on other platforms to be able to use characters such as '�', '�' and '�', for instance.
    And if changes were made, why not enable the simple way of specifying a mnemonic that other platforms have implemented, by adding an '&' in front of the character?
    Sorry if this disintegrated into a rant - didn't mean to... :-) I'm sure there must be good reasons for the changes, would love to understand them.

  • Replacing any non english Characters

    How can I Replace any non english characters I have alot of the characters that look like a block.
    --John                                                                                                                                                                                                                   

    Probably the easiest way to code would be to convert the string to a byte array and back again using the ASCII character encoding. That should give you ? for any non ASCII characters.
    Something like;
    String newString = new String(oldString.getBytes("ASCII"), "ASCII");

  • How to load file thru reader which contains non-english char in file name

    Hi ,
    I want to know how to load file in english machine thru reader which contains non-english chars in file names (eg. 置顶.pdf)
    as LoadFile gives error while passing unicode converted file name.
    Regards,
    Arvind

    You don't mention what version of Reader?  And you are using the AcroPDF.dll, yes?
    Sent from my iPad

Maybe you are looking for

  • JWSDP 2.0 and SAAJ SOAP - envelope error

    I've integrated JWSDP 2.0 SAAJ security into a J2EE servlet that sends and receives SAAJ SOAP. I have tested and verified all sample security configurations except encryptv1.xml and encryptv2.xml. My issues is that although I am able to encrypt messa

  • Additional line item for Exchange rate gain / loss

    HI, We ahve three currency as Main currency (INR), group currency (INR) and Hard currency (USD). When we pay to vendor or received from customer, system generate additional line item for Exchange rate gain / loss with Rs. Zero . But transaction is in

  • Changes visible in BOM although ECM not released yet

    Hi, I have a BOM which has been updated together with a change number. The change number still has status "in work" and not released. When I go to CS03, with all dates removed on the selection screen, I see the changes in there with the change number

  • How to run thrid party exe

    Hi, I'm new to netbeans, I'm trying to make a GUI to that it can run a third-party command-line exe. the command that I'm trying to work on is as follows: clic mp3play.gd -i c:\test.mp3 where: clic is the main exe. mp3play.gd  -i is the parameter tes

  • Submit ALV in webdynpro

    Hello folks, i need to load the information from the result of a ALV in a webdynpro. The program aqzzzhr_rc======zhr_rc06====== and the variant CUS&STANDARD. I am using this:   DATA list_tab TYPE TABLE OF abaplist.   SUBMIT aqzzzhr_rc======zhr_rc06==