Entering Scandinavian characters into AWT TextField

I have a problem entering Scandinavian characters, ���, into AWT textfields. All I get is squares. The entered text, sent to a database, is not stored correctly either, so it is not just a display problem.
But then, I can copy-paste (both select - middle button, and ctrl-c - ctrl-v) these characters without problems, both from other fields within the application and from other X11 applications.
This is on Linux, I do not have a possibility to test on Windows.

You can also use KeyListener. You can also search the forum as this question has been asked numerous times.

Similar Messages

  • Writing strings containing \0 characters into a TextField

    Hi,
    I have a string containing one or more '\0' characters. I need to write it into a TextField and, for the purpose, I use the setText method.
    What I get then is a substring containing only the characters before the first \0.
    If I use a JTextField then I am able to see all the characters but if I try to copy and paste the content of the JTextField (using CTRL-C and CTRL-V) I get again a substring terminated by the first \0.
    Could someone help me?

    Hello again,
    I wrote this program that will copy from one JTextField to another. are you trying to past to another application, if I past the string into ultraedit (text editor) I get the first word, I can't see a way around that?
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class SimpleApp extends JFrame {
    public static void main(String args[]) {
    SimpleApp aFrame = new SimpleApp();
    JTextField myTextField = new JTextField("one\0two\0three\0four\0");
    JTextField myTextField2 = new JTextField();
    public SimpleApp() {
    super("Frame");
    getContentPane().setLayout(new BorderLayout());
    setResizable(false);
    myTextField.setColumns(30);
    myTextField2.setColumns(30);
    getContentPane().add(myTextField, "Center");
    getContentPane().add(myTextField2, "South");
    pack();
    show();
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    }

  • Can't input Japanese characters into BrowserBasedHelp search

    We're using RH 8.0.2.208 to create BrowserBasedHelp output for a client-side application. We have a different project for each language. In the Japanese language output, a user cannot enter Japanese characters into the search field using the Japanese keyboard; when you press the keys, nothing displays in the search field, but you CAN copy and paste Japanese characters into the search field and find results.
    The Project Settings: Language setting is set to Japanese (Japan), and the properties in the generated HTML topic files are also set for Japanese.
    Has anyone run into this before? I've searched and found a few topics with similar problems, but didn't see any replies or answers.

    Hi,
    I dont have japanese keyboard, but I tried the same with Japanese langauge bar installed with Microsoft IME. And I was able to type japanese characters in Browser based help.
    thanks
    Praful

  • Entering accented characters via Simulator

    I turned on international keyboard support in Simulator. I can switch to French keyboard. I can hold down 'e' to show me the options for 'e' (é,è,ê,ë...), but I can pick any of them. The keys for r,t,y...are highlighted instead.
    This a bug? Anyone get it to work?

    Follow up....I can enter accented characters into the contact app in the simulator so it's not keyboard related as I thought. But, I can't enter the characters if I'm running the SQLiteBooks example Apple posted today.

  • Have a problem in Numbers with entering data directly into a cell when a table reaches a certain size and special characters are used?

    I am creating a list of words with special characters in some of them. I get to a point where I cannot enter data directly into the cell. I have to use the data entry bar at the top in the toolbar. Any solutions available?
    This is the table I am creating...
    From row 25 on, I am only able to enter data into the cell through the toolbar at the top and not directly into the cell itself. I believe that this problem originates from the special characters I have inserted in the previous records because if I do not use special characters, then the spreadsheet acts flawlessly. Have there been issues in Numbers with data entry, the size of a table, and using special characters?

    I would try removing the rows with "special" characters one at a time to see which one is causing the problem

  • Prevent User From Entering Characters In A TextField

    Does anyone know how to prevent certain kinds of letters or symbols from being entered into a textfield? Something that prevents the user from typing a minus sign or the letter Q.

    You can also use KeyListener. You can also search the forum as this question has been asked numerous times.

  • The final solution to greek characters in AWT applets(????)

    OK. I have searched the whole web and asked whoever I knew. The question was simple: How do I show greek characters in a TextField in an AWT Applet? Some people said that I should change the font properties inside MY jre/lib installation but then I want EVERYONE and not just ME seeing the greek characters! Adding a greek font into the applet's jar was another "solution" but who wants to have an applet of about 2MBs? So I think I have come up to the answer ... ONLY with jre > 1.4.0 somebody could handle greek characters in AWT Applets without trooble! If somebody has managed to show and handle greek characters in a TextField inside an AWT Applet (which I doubt), I would like to know EXACTLY HOW as I am tired of non-working "solutions"! I hope this post saves you from a lot of time searching for the HolyGrail

    I haven't worked with a TextField but I worked with a JTextField. My solution wasn't very straightforward but it did the job.
    I used this solution in order to work with linux, but you must add an if
    statement to check the OS.
    If your problem was how to view Greek characters in a non internation version of
    Java, then as far as I know, you cannot! Also JDK 1.3.1_01 and j2re 1.4.0_01
    use a different way of loading system fonts, so with the latter you cannot use system fonts unless you put them in you java directory.
    (I use linux so don't be surprissed if these work different in windows)
    import java.io.*;
    public class JTextFieldGr extends javax.swing.JTextField {
    public JTextFieldGr() {
    super();
    myInit();
    public JTextFieldGr(String text) {
    super(text);
    myInit();
    public void myInit() {
    addKeyListener(new java.awt.event.KeyListener() {
    public void keyTyped(java.awt.event.KeyEvent evt){
    try{
    String tmp=""+evt.getKeyChar();
    String uk=new String(tmp.getBytes(),"ISO-8859-7");
    evt.setKeyChar(uk.charAt(0));
    }catch(UnsupportedEncodingException e){
    e.printStackTrace();
    public void keyPressed(java.awt.event.KeyEvent evt){
    public void keyReleased(java.awt.event.KeyEvent evt){
    }

  • Entry of non-English characters into the db

    Hi
    We are facing a problem in inserting non-English characters into the database.For example, we have a company name field which can accept German characters. This field has been defined as of varchar2 type of size 50 in the db. When we enter 49 English characters and then one German character, the database is throwing the error that the inserted value is too large for the column.Is it that the German character is taken as equivalent to two English characters ? Or is there any database level setting that can be done for this ? For the time being we have identified certain critical fields and have doubled the size of their fields in the db. But I guess there has to be another solution to this....
    Please help.
    null

    Indeed, your German character is using two bytes to store itself. Consult the Oracle JDBC Developer's Guide.
    null

  • Entry of non-English characters into database

    Hi
    We are facing a problem in inserting non-English characters into the database.For example, we have a company name field which can accept German characters. This field has been defined as of varchar2 type of size 50 in the db. When we enter 49 English characters and then one German character, the database is throwing the error that the inserted value is too large for the column.Is it that the German character is taken as equivalent to two English characters ? Or is there any database level setting that can be done for this ? For the time being we have identified certain critical fields and have doubled the size of their fields in the db. But I guess there has to be another solution to this....
    Please help.
    TIA
    Vinoj

    Indeed, your German character is using two bytes to store itself. Consult the Oracle JDBC Developer's Guide.
    null

  • Pls help.JSP: I could not store Chinese characters into files.

    Hi experts,
    I have this problem of cant store chinese characters into files(eg. .txt and .properties). I am adding
    these chinese text through a JSP website form....After i key in chinese characters in the textboxes
    in the website and sumbit the results, my chinese characters turned into ASCII or rather garbage in
    the files.
    Is there any way i can get the exact chinese characters i entered in the webite into the files?
    Need urgent assistance here.
    Thanks
    <%@ page contentType="text/html; charset=big5" %>
    <html>
    <head>
    <title>Confirmation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=big5">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    </head>
    <%@ page language="java"%>
    <%@ page import="java.io.*"%>
    <%@ page import="java.lang.Integer.*"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="java.sql.ResultSet.*"%>
    <%@ page import="javax.servlet.*"%>
    <%@ page import="javax.servlet.http.*"%>
    <%@ page import="java.text.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.net.URL"%>
    <%
    //getting attributes from previous page form
    //At this point, chinese characters r retrieved
    //Ascii/garbage displayed for text when retrieved from previous page.
    String gameName=request.getParameter("name");
    String encode=request.getParameter("encode");
    String gameType=request.getParameter("type");
    String info=request.getParameter("description");
    int check=0;
    int nextGameID;
    String temp="";
    String langCode="";
    //establish connection
    Connection con = null;
    try {
    Class.forName("org.postgresql.Driver");
    con = DriverManager.getConnection("jdbc:postgresql://172.20.134.110:5432/smsINTFET" , "postgres",
    "postgres");
    catch(ClassNotFoundException e) {
    out.println("Could not load the driver: "+e.getMessage());
    catch(SQLException e) {
    out.println("SQLException caught in relax db: "+ e.getMessage());
    Statement stmt = null;
    ResultSet rs = null;
    ResultSet ps = null;
    String strSQL = "";
    String strSQL2 = "";
    String tempCat = "";
    strSQL="SELECT gamename FROM cp_games order by gameid;";
    try {
    stmt = con.createStatement();
    rs = stmt.executeQuery(strSQL);
    stmt.close();
    catch(SQLException e) {
    out.println("SQLException caught: "+ e.getMessage());
    while(rs.next())
    check=0;
    temp=rs.getString("gamename");
    if(temp.equalsIgnoreCase(gameName))
    // there is similar record in database
    check=1;
    break;
    else
    check=0;
    if(check==0)
    %>
    <body background="button/bkgd.jpg" bgproperties="fixed">
    <p><b><font size="30pts" face="Monotype Corsiva">Confirmation</font></b></p>
    <HR style="WIDTH: 500px; COLOR: blue; HEIGHT: 3px">
    The following information has been added.
    <table width="75%" border="0" cellspacing="0" cellpadding="2">
    <%
    String strCat="";
    strCat="INSERT INTO cp_games(gamename,description,encode) values('"+gameName+"','"+info+"','"+encode+"');";
    stmt = con.createStatement();
    stmt.executeUpdate(strCat);
    System.out.println("Successful inserted category");
    stmt.close();
    //setting language
    if(encode.equals("ascii"))
    langCode = "US";
    if(encode.equals("ms950"))
    langCode = "TW";
    if(encode.equals("ms936"))
    langCode = "CN";
    strSQL2="SELECT gameid FROM cp_games where gamename = '"+gameName+"';";
    try {
    stmt = con.createStatement();
    ps = stmt.executeQuery(strSQL2);
    stmt.close();
    catch(SQLException e) {
    out.println("SQLException caught: "+ e.getMessage());
    ps.next();
    nextGameID=ps.getInt("gameid");
    out.println("<B>The game number : </B>" + nextGameID);
    %>
    <tr>
    <td><B>Game added: </B><%=gameName%>
    </td>
    </tr>
    </table>
    <%
    String newFile="G:\\home\\smsGamesINTV2\\colorGame\\propertiesFiles\\FET\\CP_Game"+nextGameID+"_"+encode+"_"+langCode+".properties";
    try
    {               //begin file
    PrintWriter outFile=null;
    //create a new file and write the initial settings to file
    outFile=new PrintWriter(new FileOutputStream(newFile,true));
    outFile.println("game_intro="+nextGameID+")"+gameName+" - "+info);
    outFile.println("");
    outFile.println("game_title="+gameName);
    outFile.println("");
    outFile.println("game_type="+gameType);
    outFile.println("");
    outFile.println("qns_no=0");
    outFile.println("");
    outFile.println("ana_no=0");
    outFile.close();
    }//end file
    catch(IOException e)
    out.println("File Create Error");
    else // no match found
    out.println("Game,"+temp+ " already added");
    %>
    </body>
    </html>

    try to add this code under this line:
    <%@ page contentType="text/html; charset=big5" %>
    <% response.setContentType("text/html; charset=big5"); %>
    I have faced the problem like yours and it works fine for me. Try and see.

  • Entering special characters at the command line.

    I'm writing a simple program in java that automates certain processes in learning a foreign language.
    This includes holding a database of vocabulary within the context of a sentence and testing a student on words they have encountered.
    Nothing too tricky, except that I am having trouble with entering special characters at the command line. I'm not really surprised by this and was hoping that someone could help me.
    I'm using a mixture of Solaris 8 and Mac OS X 10.3 for running the software, so anyone with any input on either of these systems will be able to help.
    The characters I am trying to enter are the following:
    �,�,�,�,�,�,�,�,�,�,�,�.
    They are latin, and used in Spanish amongst other languages.
    I'm a little confused by the implementation of character sets. I can enter these characters in applications such as word or textedit or an email, but just not at an X window.
    From looking at the web it appears that these characters can be input using the
    Latin1 (ISO 8859-1) character set or the ISO 10646-1/Unicode extension.
    I'm just not sure what I actually have to do to get it to work.
    If anyone can offer any help I'd be really grateful.
    Ian Stanton

    It's a problem that could be encountered in different circumstances, in this circumstance it is with a program I am writing in java.
    I anticipate that these days not that many applications are delivered that require use of the command line, but since I am still learning Java it is necessary to explore this avenue.
    It's interesting actually since presumably developers writing code for the international market need to accomodate characters similar to those I am attempting to enter, and more that are less familiar to me such as far and middle eastern scripts, and of course many others.
    We (possibly) assume that since a character is printed on our keyboard it is a simple matter to read it in. But what if I was a Spanish student wanting to type a character into the command line and that character wasn't there? I believe that Spanish (and variants of that language) is the third most spoken language on the planet.
    These characters are often relatively easy to enter in office and internet applications amongst others but apparetly not so at the command line.
    Maybe this question is more suitably asked of the Unix community but I thought it a good idea to try Java since i was writing Java code and that many Java programmers could have encountered the same problem.

  • Entering extended characters?

    As a recentish switcher I'm completely stumped by how I can enter extended characters. I need to enter the character code 0239 to get a special character in a font I'm using. On a PC I'd simply type 0239 on the numeric pad while holding down the Alt key. But that doesn't work on the Mac.
    Any help much appreciated. GeoffT.

    Most apps have an item in the "Edit" menu called "Special Characters..." which brings up a palette with just about every conceivable character set you could want. That should do the trick, unless the app is so old that it doesn't enable this system-level item. Assuming it works, once you've found the character you want, just click the "Insert" button in the lower-right of the palette to insert it into the active text field.
    Here's Apple's description of the same feature:
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8164.html
    There are also many longstanding tricks to enter the more common special characters such as curly quotes, emdashes, and accented characters. Here's a very old but still valid cheat sheet:
    http://home.earthlink.net/~awinkelried/keyboard_shortcuts.html

  • Can't enter loging information into NETFLIX from my Toshiba 47L6200U TV or keyboard

    I just got a new Toshiba 47L6200U smart TV. Everything seems to be working fine. When I try to use Netflix and I get the login screen I am not able to enter any letters or characters into the username and password windows. Various Internet features work fine and the keyboard eventhough slow but seems to work fine. 
    Any ideas?
    Solved!
    Go to Solution.

    I believe you need to use the remote to enter the Netflix information. Press the OK button on the remote to open the on-screen keyboard.
    - Peter

  • Today's date dynamically entered into text field that user enters additional text into same field.

    Trying to have today's date dynamically entered into a repeating table row textfield when the button is clicked to create each repeating row. The user can then enter addtional text into the same text field next to the date.
    Example:
    [4/25/2012] This is the text the user entered.
    Today's date is populated in each update row created when the "Update Row" button is clicked.
    The following script works but only for the first instance, not the second, third, forth, etc...
    Click event: (JavaScript, client)
    this.resolveNode('Table2._RowB').addInstance(1);
    xfa.resolveNode("Table2.RowB.#subform.Update").rawValue
    Thank you,
    ~Don

    Hi Don,
    Does this solution cover the above problem? https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw
    Niall

  • How AWT TextField can copy/paste from another application?

    Hi,
    We know in applet for the security reason you can not access the getSystemClipboard from the Swing component like JTextField. But We know that with AWT TextField, you can copy and paste from another application. My question is how AWT textfield implemented with this feature. I don't think it is via the systemclipboard. Can some explain this for me?

    the simplest way is to select the part of charactors and drag them into your textfield ^O^

Maybe you are looking for

  • Link b/w ROCANCEL, 0STRONO, 0RECORDMODE

    Hi I read the OSS Note 399739 'Questions and answers on InfoObject 0RECORDMODE': In this i didnt understand the link b/w  ROCANCEL, 0STRONO, 0RECORDMODE. I checked FI transfer rules, 0RECORDMODE is mapped with UPMOD BUT 2LIS_13_VDITM there is no 0REC

  • Convert OTF to PDF problem

    Hi everyone, I am currently testing a report in our acceptance box. The report is converting a sapscript form output to OTF. Then the OTF result will be converted to PDF that will be sent to external email address as attachment. However, when I check

  • How can I get rid of promotional ads that are preventing me from expanding my email folders?

    Today for the first time, I am getting two promotion ads that regularly change, on the left side of my screen when I am in email, right where my expanded folders normally appear. I tried "expand" and just get a tiny line at the top of these ads with

  • J2EE Business Application Development Guide

    Dear Sir, I am looking for a suitable book which can explain complete approach and methodology for developing an Enterprise "Business Application (preferably either from Manufacturing or Banking sector)" using J2EE . The book should explain complete

  • Alternative of Infopath forms

    Hi, Can anyone suggest me if there is any alternative way for customizing the list item forms: newItem.aspx,editItem.aspx and viewItem.aspx. We can easily customize these forms with the help of infopath forms but if anyone has a Standard Edition whic