Problem loading Cyrillic characters with UTF16

I am trying to use SQL*Loader to load data into a table that consists of American and Cyrillic columns. The Cyrillic columns are of type NVARCHAR2(300).
The database NLS params are as follows: NLS_LANGUAGE = AMERICAN, NLS_TERRITORY = AMERICA, NLS_CHARACTERSET =
WE8ISO8859P1 and NLS_NCHAR_CHARACTERSET = AL16UTF16. The SQL*Loader control file contains the lines:
CHARACTERSET UTF16
BYTEORDER BIG
The data loads but I get question marks in the NVARCHAR2 columns. I tried setting NLS_LANG to AMERICAN_AMERICA.WE8ISO8859P1 and it still loads
the same way. Do I need to change the NLS_CHARACTERSET to UTF16 as well? What else could I be missing?

Please check the below. It addresses the same problem as yours:
http://www.experts-exchange.com/Database/Oracle/10.x/Q_23665329.html

Similar Messages

  • Having problem loading Aol mail with Firefox ver 4. Keep getting error 8 msg. Any ideas?.

    INstalled Firefox 4 and now cannot laod the aol mail website. I can use ms explore with no problem. Get error msg 8 Problem loading application. AOL itself loads fine, just not mail.

    INstalled Firefox 4 and now cannot laod the aol mail website. I can use ms explore with no problem. Get error msg 8 Problem loading application. AOL itself loads fine, just not mail.

  • Problem loading Image data with French accent in file name

    We have a very complex commercial application that has been working perfectly in English for over a year. We have now localized it to French and Spanish, and discovered a serious show-stopping problem. We need help fast, with the scheduled release being less than 2 weeks away...!
    We iterate over a folder to find all the images in it, then display those in a user window.  The code for loading the images is:
                for each (var name:String in filenames){
                    var image:SmoothImageTransformable = new SmoothImageTransformable();
                    var imagePath:String = dir + "/" + name;
                    image.source = imagePath;
                    trace("Adding Item to picture carousel with url " + image.source);
                    image.data = {directory:dir, filename:name};
                    image.isDragEnabled = true;
                    image.setStyle("horizontalCenter", 0);
                    image.setStyle("verticalCenter", 0);
                    _images.push(image);
    Our SmoothImageTransformable class is an internal class that inherits from Image.  This all works fine for image names like 'myFavoritePhoto', 'test', 'photo346', etc.  However, it fails to load the data if the file name is something like 'caméra'  Any name with a UTF-8 character causes the data load to fail.
    To be sure we weren't doing a load somewhere else in the code that I had overlooked, I added a "image.autoLoad = false' line in there.  That did exactly as expected -- all image squares then show a grey blank, with no image shown.  Removing that line (reverting to the original code, as shown above) causes all the images to work perfectly, except for those with French accent characters like the é.
    HELP!  Is this a known bug?  Is there some additional setting I need to make it understand the extended character set?  I can't find any mention about this at all in the documentation.

    @markerline:
    We have a fix!  Almost...   I don't understand one aspect of what I am seeing though.
    We have one test file named "camèra.jpg" that is an example of what I am unable to load into an Image.  I decided to examine the character codes at each letter, and this is what Flex has as the string:
    name = cam?ra.jpg
       [0] = c; 0x99
       [1] = a; 0x97
       [2] = m; 0x109
       [3] = ?; 0x232
       [4] = r; 0x114
       [5] = a; 0x97
       [6] = .; 0x46
       [7] = j; 0x106
       [8] = p; 0x112
       [9] = g; 0x103
    Note that the è prints as gibberish in the trace statement, and shows a numeric encoding of 0x232.  According to
         http://docstore.mik.ua/orelly/web2/action/appb_01.htm
    The unicode equivalent of Latin1 for è is 0xE8, which is equivalent to 0x232. That implies that the string is already Latin1, which I would think would mean that Windoze would recognize the file name and open it properly -- but it does not.
    I then tried taking the "camèra.jpg" string, pasting it into NotePad++ in a UTF8 document, then telling NotePad++ to display as ASCII.  The result is "camèra".  I then tried just forcing the file name within Flex to this new mangled string.  The result then is:
    MAGIC name = camèra
       [0] = c; 0x99
       [1] = a; 0x97
       [2] = m; 0x109
       [3] = ?; 0x195
       [4] = ?; 0x168
       [5] = r; 0x114
       [6] = a; 0x97
       [7] = .; 0x46
       [8] = j; 0x106
       [9] = p; 0x112
      [10] = g; 0x103
    Note this time the trace statement looks proper.  More important, the IMAGE DOES LOAD!  (Our display of the name to the user now looks like crap, but that just means I need to modify our class to have a separate 'name' property, rather than extracting it from the 'image.source')
    So... my remaining question -- what encoding did I just do through that NotePad++ incantation?  That site I quoted above said that it was already Latin1, which is what I thought I was trying to get to.  I clearly need to write a method to map from incoming (UTF8 I thought, but maybe Latin1?) to Windows file system (Latin1 I thought, but maybe ASCII).
    In other words, I am not sure what charcter set to come from or go to...  It turns out the code was already in the character set I had been trying to go to (which is why it wasn't working) and the set I seem to need to go to is not the one I thought...

  • Anyone have problems loading the forums with Chrome ?

    Since 2 weeks I am having problems in chrome ( don't load sections etc ), if I access with FF all works ok, but with chrome and safari is imposible to navigate to the diferent forums etc...

    Strange... Really... by example whe I come to forums.adobe.com I can select
    AIR Forum in the select box, but when I click the "OK" button nothing
    happends....

  • Problems reading unicode characters with BufferedReader or PrintWriter

    I am creating a pretty standard chat server and client with the exception that I want to be able to send special math symbols back and forth to aid in helping people with math homework. The unicode characters will appear on the buttons, in the textField (where users type in their messages), in the messageArea (where users see all of the messages) correctly. However, as soon as the server reads it, it is converted to a ? character by either the BufferedReader or the PrintWriter, but I am fairly certain it is the BufferedReader. All of the Sun examples I have read recommend doing exactly what I have done to be able to support unicode characters so I am somewhat at a loss. Any help would be appreciated. I will include all of the source code (which is rather large) but the main problem is the with the BufferedReader or PrintWriter when the servers reads the string in and then broadcasts it to all the clients (at least I'm pretty sure it is).
    // ChatServer.java
    import java.net.Socket;
    import java.net.ServerSocket;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.util.Set;
    import java.util.HashSet;
    import java.util.HashMap;
    import java.util.Iterator;
    * A multithreaded chat room server. When a client connects the
    * server requests a screen name by sending the client the
    * text "SUBMITNAME", and keeps requesting a name until
    * a unique one is received. After a client submits a unique
    * name, the server acknowledges with "NAMEACCEPTED". Then
    * all messages from that client will be broadcast to all other
    * clients that have submitted a unique screen name. The
    * broadcast messages are prefixed with "MESSAGE ".
    * Because this is just a teaching example to illustrate a simple
    * chat server, there are a few features that have been left out.
    * Two are very useful and belong in production code:
    * 1. The protocol should be enhanced so that the client can
    * send clean disconnect messages to the server.
    * 2. The server should do some logging.
    public class ChatServer {
    * The port that the server listens on.
    private static final int PORT = 9001;
    * The set of all names of clients in the chat room. Maintained
    * so that we can check that new clients are not registering name
    * already in use.
    private static HashSet names = new HashSet();
    * The set of all the print writers for all the clients. This
    * set is kept so we can easily broadcast messages.
    private static HashMap writers = new HashMap();
    private static HashMap userSockets = new HashMap();
    private static Set keys;
    * The appplication main method, which just listens on a port and
    * spawns handler threads.
    public static void main(String[] args) throws Exception {
    System.out.println("The chat server is running.");
    ServerSocket listener = new ServerSocket(PORT);
    try {
    while (true) {
    new Handler(listener.accept()).start();
         } catch (Exception e) {
    } finally {
    listener.close();
    * A handler thread class. Handlers are spawned from the listening
    * loop and are responsible for a dealing with a single client
    * and broadcasting its messages.
    private static class Handler extends Thread {
    private String name;
    private Socket socket;
    private BufferedReader in;
    private PrintWriter out;
    * Constructs a handler thread, squirreling away the socket.
    * All the interesting work is done in the run method.
    public Handler(Socket socket) {
    this.socket = socket;
    public void disconnect(String userName) {
    if (userName != null) {
    names.remove(userName);
    if (writers.get(userName) != null) {
    writers.remove(userName);
    try {
    ((Socket)userSockets.get(userName)).close();
    } catch (IOException e) {
    e.printStackTrace();
    System.out.println(userName +" has disconnected from the Chat Server.");
    keys = writers.keySet();
    for (Iterator i = keys.iterator(); i.hasNext(); ) {
    ((PrintWriter)writers.get(i.next())).println(
    "USERQUIT" +name);
    public void disconnectAll() {
    for (Iterator i = names.iterator(); i.hasNext();) {
    String userName = i.next().toString();
    if (!userName.equals("administrator")) {
    names.remove(userName);
    keys = writers.keySet();
    for (Iterator it = keys.iterator(); it.hasNext(); ) {
    ((PrintWriter)writers.get(it.next())).println(
    "USERQUIT" +name);
    writers.remove(userName);
    userSockets.remove(userName);
    * Services this thread's client by repeatedly requesting a
    * screen name until a unique one has been submitted, then
    * acknowledges the name and registers the output stream for
    * the client in a global set, then repeatedly gets inputs and
    * broadcasts them.
    public void run() {
    try {
    // Create character streams for the socket.
    in = new BufferedReader(new InputStreamReader(
    socket.getInputStream()));
    out = new PrintWriter(socket.getOutputStream(), true);
    // Request a name from this client. Keep requesting until
    // a name is submitted that is not already used. Note that
    // checking for the existence of a name and adding the name
    // must be done while locking the set of names.
    while (true) {
    out.println("SUBMITNAME");
    name = in.readLine();
    if (name == null) {
    return;
    synchronized (names) {
    if (!names.contains(name) && name.equalsIgnoreCase("administrator")) {
    out.println("SUBMITPASSWORD");
    String password = in.readLine();
    if (password.equals("s3cure")) {
    out.println("GRANTEDADMIN");
    if (!names.contains(name)) {
    names.add(name);
    break;
    // Now that a successful name has been chosen, add the
    // socket's print writer to the set of all writers so
    // this client can receive broadcast messages.
    out.println("NAMEACCEPTED");
    keys = writers.keySet();
    for (Iterator i = keys.iterator(); i.hasNext(); ) {
    ((PrintWriter)writers.get(i.next())).println(
    "USERJOIN" +name);
    writers.put(name, out);
    userSockets.put(name, socket);
    System.out.println(name +" has successfully connected to the Chat Server.");
    // Accept messages from this client and broadcast them.
    // Ignore other clients that cannot be broadcasted to.
    while (true) {
    String input = in.readLine();
    if (input == null) {
    return;
              else if (input.startsWith("LISTUSERS")) {
                   Iterator i = names.iterator();
                   String namesString = new String();
                   while (i.hasNext()) {
                   namesString += " " +i.next();
                   out.println("USERLIST " +namesString);
         catch (Exception e) {
         finally {
              disconnect(name);
    // ChatClient.java
    import java.util.HashSet;
    import java.util.StringTokenizer;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.ListIterator;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyEvent;
    import java.awt.Point;
    import java.awt.Button;
    import java.awt.Font;
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.Dimension;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JTextArea;
    //import javax.swing.JTextPane;
    import javax.swing.JScrollPane;
    import javax.swing.JOptionPane;
    import javax.swing.JList;
    import javax.swing.DefaultListModel;
    import javax.swing.JMenuBar;
    import javax.swing.JMenu;
    import javax.swing.JMenuItem;
    import javax.swing.JPopupMenu;
    import java.net.Socket;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    import java.io.PrintWriter;
    import java.io.IOException;
    * A simple Swing-based client for the chat server. Graphically
    * it is a frame with a text field for entering messages and a
    * textarea to see the whole dialog.
    * The client follows the Chat Protocol which is as follows.
    * When the server sends "SUBMITNAME" the client replies with the
    * desired screen name. The server will keep sending "SUBMITNAME"
    * requests as long as the client submits screen names that are
    * already in use. When the server sends a line beginning
    * with "NAMEACCEPTED" the client is now allowed to start
    * sending the server arbitrary strings to be broadcast to all
    * chatters connected to the server. When the server sends a
    * line beginning with "MESSAGE " then all characters following
    * this string should be displayed in its message area.
    public class ChatClient {
    BufferedReader in;
    PrintWriter out;
    JFrame frame = new JFrame("Math Chatter version 0.3");
    JTextField textField = new JTextField(40);
    JTextArea messageArea = new JTextArea(25, 40);
    //JTextPane messageArea = new JTextPane();
    // Menu
    JMenuBar menuBar = new JMenuBar();
    // File Menu and MenuItems
    JMenu fileMenu = new JMenu();
    JMenuItem connectMenuItem = new JMenuItem();
    JMenuItem disconnectMenuItem = new JMenuItem();
    JMenuItem exitMenuItem = new JMenuItem();
    // Help Menu and MenuItems
    JMenu helpMenu = new JMenu();
    JMenuItem aboutMenuItem = new JMenuItem();
    JOptionPane aboutDialog = new JOptionPane();
    // Message Area Popup Menu and MenuItems
    JPopupMenu messageAreaPopupMenu = new JPopupMenu();
    JMenuItem connectPopupMenuItem = new JMenuItem();
    JMenuItem disconnectPopupMenuItem = new JMenuItem();
    JMenuItem clearTextMenuItem = new JMenuItem();
    JMenuItem exitPopupMenuItem = new JMenuItem();
    MouseListener messageAreaPopupListener = new messageAreaPopupListener();
    // User Area Popup Menu and MenuItems
    JPopupMenu userAreaPopupMenu = new JPopupMenu();
    JMenuItem pingPopupMenuItem = new JMenuItem();
    JMenuItem disconnectUserPopupMenuItem = new JMenuItem();
    JMenuItem disconnectAllUsersPopupMenuItem = new JMenuItem();
    MouseListener userAreaPopupListener = new userAreaPopupListener();
    // Panel with textfield, send, and clear buttons
    JPanel sendTextPanel = new JPanel();
    // Panel that has all the math buttons
    JPanel buttonPanel = new JPanel();
    // Panel that has messageArea and users panell
    JPanel displayPanel = new JPanel();
    DefaultListModel listModel = new DefaultListModel();
    JList userNamesList = new JList(listModel);
    //JTextArea userNamesTextArea = new JTextArea(25, 10);
    // buttonPanel stuff
    Button sendButton = new Button();
    Button clearButton = new Button();
    Button infinityButton = new Button();
    Button thetaButton = new Button();
    Button limitButton = new Button();
    Button thereforeButton = new Button();
    JLabel buttonLabel = new JLabel("Useful math stuff: ");
    HashSet usersHashSet = new HashSet();
    LinkedList sentMessageList = new LinkedList();
    ListIterator sentMessageIterator;
    boolean isAdmin = false;
    * Constructs the client by laying out the GUI and registering a
    * listener with the textfield so that pressing Return in the
    * listener sends the textfield contents to the server. Note
    * however that the textfield is initially NOT editable, and
    * only becomes editable AFTER the client receives the NAMEACCEPTED
    * message from the server.
    public ChatClient() {
    // -----------------> Layout MenuBar
    frame.setJMenuBar(menuBar);
    fileMenu.setText("File");
    connectMenuItem.setText("Connect");
    connectMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    showWhoopsDialog();
    /*out.println("CONNECT");
    try {
    run();
    catch (Exception ex) {
    ex.printStackTrace();
    fileMenu.add(connectMenuItem);
    disconnectMenuItem.setText("Disconnect");
    disconnectMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    chatDisconnect();
    fileMenu.add(disconnectMenuItem);
    exitMenuItem.setText("Exit");
    exitMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    frame.dispose();
    System.exit(0);
    return;
    fileMenu.add(exitMenuItem);
    menuBar.add(fileMenu);
    helpMenu.setText("Help");
    aboutMenuItem.setText("About");
    aboutMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    aboutDialog.setDoubleBuffered(true);
    aboutDialog.showMessageDialog(frame,
    "Chat Server and Client were originally written by Ray Toal and were found at \n http://www.technocage.com/~ray/viewsource.jsp?java/networking/ChatServer.java and \n http://www.technocage.com/~ray/viewsource.jsp?java/networking/ChatClient.java. \n\n Math Chatter and all revisions have been done by William Ready.",
    "About Math Chatter Server and Client version 0.3",
    JOptionPane.INFORMATION_MESSAGE);
    helpMenu.add(aboutMenuItem);
    menuBar.add(helpMenu);
    // -----------> End Menu
    // -----------> Popup Menus
    // -----------> Message Area Popup Menu
    connectPopupMenuItem.setText("Connect");
    connectPopupMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    showWhoopsDialog();
    disconnectPopupMenuItem.setText("Disconnect");
    disconnectPopupMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    chatDisconnect();
    clearTextMenuItem.setText("Clear text");
    clearTextMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    messageArea.setText("");
    exitPopupMenuItem.setText("Exit");
    exitPopupMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    frame.dispose();
    System.exit(0);
    messageAreaPopupMenu.add(connectPopupMenuItem);
    messageAreaPopupMenu.add(disconnectPopupMenuItem);
    messageAreaPopupMenu.add(clearTextMenuItem);
    messageAreaPopupMenu.add(exitPopupMenuItem);
    messageArea.addMouseListener(messageAreaPopupListener);
    // -----------> End Message Area Popup Menu
    // -----------> User Area Popup Menu
    pingPopupMenuItem.setText("Ping User");
    pingPopupMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    //System.out.println("Yo yo yo");
    disconnectUserPopupMenuItem.setText("Disconnect User");
    disconnectUserPopupMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (userNamesList.getSelectedValue() != null) {
    //System.out.println("Yo yo yo");
    out.println("DISCONNECTUSER " +userNamesList.getSelectedValue().toString());
    //disconnectUserPopupMenuItem.setEnabled(false);
    disconnectUserPopupMenuItem.setVisible(false);
    disconnectAllUsersPopupMenuItem.setText("Disconnect All Users");
    disconnectUserPopupMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (userNamesList.getSelectedValue() != null) {
    //System.out.println("Yo yo yo");
    out.println("DISCONNECTALLUSERS");
    //disconnectUserPopupMenuItem.setEnabled(false);
    disconnectAllUsersPopupMenuItem.setVisible(false);
    userAreaPopupMenu.add(pingPopupMenuItem);
    userAreaPopupMenu.add(disconnectUserPopupMenuItem);
    userAreaPopupMenu.add(disconnectAllUsersPopupMenuItem);
    userNamesList.addMouseListener(userAreaPopupListener);
    // -----------> End User Area Popup Menu
    // -----------> End Popup Menus
    // -----------> Layout GUI
    textField.setEditable(false);
    textField.requestDefaultFocus();
    messageArea.setEditable(false);
    sendTextPanel.setLayout(new FlowLayout());
    sendTextPanel.add(textField);
    sendButton.setLabel("Send");
    sendButton.setEnabled(false);
    sendTextPanel.add(sendButton);
    clearButton.setLabel("Clear");
    sendTextPanel.add(clearButton);
    buttonPanel.setLayout(new FlowLayout());
    buttonPanel.add(buttonLabel);
    infinityButton.setLabel("\u221e");
    buttonPanel.add(infinityButton);
         thetaButton.setLabel("\u03b8");
    buttonPanel.add(thetaButton);
    limitButton.setLabel("lim");
    buttonPanel.add(limitButton);
    thereforeButton.setLabel("\u2234");
    buttonPanel.add(thereforeButton);
    userNamesList.setVisibleRowCount(26);
    userNamesList.setFixedCellWidth(110);
    JScrollPane nameTextScrollPane = new JScrollPane(userNamesList);
    JScrollPane messageAreaScrollPane = new JScrollPane(messageArea);
    displayPanel.setLayout(new FlowLayout());
    displayPanel.add(messageAreaScrollPane);
    displayPanel.add(nameTextScrollPane);
    frame.getContentPane().add(sendTextPanel, "North");
    frame.getContentPane().add(displayPanel, "Center");
    frame.getContentPane().add(buttonPanel, "South");
    frame.pack();
    // ---------------> Add Listeners
    textField.addKeyListener(new KeyListener() {
    public void keyPressed(KeyEvent e){ }
    public void keyTyped(KeyEvent e){
    if (e.getKeyChar() == KeyEvent.VK_UP) {
    if (sentMessageIterator.hasNext()) {
    textField.setText((String)sentMessageIterator.next());
    if (e.getKeyChar() == KeyEvent.VK_DOWN) {
    if (sentMessageIterator.hasPrevious()) {
    textField.setText((String)sentMessageIterator.previous());
    if (e.getKeyChar() == KeyEvent.VK_ENTER) {
    String text = textField.getText();
    if (text != null && !(text.equals(""))) {
    sentMessageList.addFirst(textField.getText());
    sentMessageIterator = sentMessageList.listIterator();
    out.println(textField.getText());
    textField.setText("");
    public void keyReleased(KeyEvent e){}
    sendButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    out.println(textField.getText());
    textField.setText("");
    textField.requestFocus();
    clearButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    textField.setText("");
    textField.requestFocus();
    infinityButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    textField.setText(textField.getText() +"\u221e");
    textField.requestFocus();
    thetaButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    textField.setText(textField.getText() +"\u03b8");
    textField.requestFocus();
    limitButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    String limit = JOptionPane.showInputDialog(frame,
    "Enter the value that the variable approaches. \n If the value is infinity, type in inf. \n (Note: the variable name is irrelevant)",
    "Value that variable approaches",
    JOptionPane.QUESTION_MESSAGE);
    if (limit != null && limit.equalsIgnoreCase("inf"))
    textField.setText(textField.getText() +"lim [x->\u221e] ");
    else if (limit != null)
    textField.setText(textField.getText() +"lim [x->" +limit +"] ");
    textField.requestFocus();
    thereforeButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    textField.setText(textField.getText() +"\u2234");
    textField.requestFocus();
    // -------------> End Listeners
    // -------------> End GUI
    * Prompt for and return the address of the server.
    private String getServerAddress() {
    return JOptionPane.showInputDialog(
    frame,
    "Enter IP Address of the Server:",
    "Welcome to the Chatter",
    JOptionPane.QUESTION_MESSAGE);
    private void showWhoopsDialog() {
    JOptionPane.showMessageDialog(frame,
    "Unfortunately this feature has not been implemented yet. \n The only way to connect currently is to exit the program \n and start it again",
    "Whoops!",
    JOptionPane.ERROR_MESSAGE);
    private void chatDisconnect() {
    messageArea.append("You have disconnected from the Chat Server\n");
    textField.setEditable(false);
    messageArea.setEnabled(false);
    userNamesList.setEnabled(false);
    fileMenu.requestFocus();
    out.println("DISCONNECT");
    * Prompt for and return the desired screen name.
    private String getName() {
    return JOptionPane.showInputDialog(
    frame,
    "Choose a screen name:",
    "Screen name selection",
    JOptionPane.PLAIN_MESSAGE);
    private String getPassword() {
    return JOptionPane.showInputDialog(
    frame,
    "Type in your password:",
    "Password Input",
    JOptionPane.PLAIN_MESSAGE);
    * Connects to the server then enters the processing loop.
    private void run() throws IOException {
    // Make connection and initialize streams
    String serverAddress = getServerAddress();
    if (serverAddress != null && !(serverAddress.equals(""))) {
    Socket socket = new Socket(serverAddress, 9001);
    in = new BufferedReader(new InputStreamReader(
    socket.getInputStream()));
    out = new PrintWriter(socket.getOutputStream(), true);
    // Process all messages from server, according to the protocol.
    while (true) {
    try {
    String line = in.readLine();
    if (line.startsWith("SUBMITNAME")) {
    out.println(getName());
              } else if (line.startsWith("NAMEACCEPTED")) {
    textField.setEditable(true);
              out.println("LISTUSERS");
    sendButton.setEnabled(true);
    //messageArea.setEnabled(true);
    } else if (line.startsWith("SUBMITPASSWORD")) {
    out.println(getPassword());
    } else if (line.startsWith("GRANTEDADMIN")) {
    isAdmin = true;
    //disconnectUserPopupMenuItem.setEnabled(true);
    disconnectUserPopupMenuItem.setVisible(true);
    disconnectAllUsersPopupMenuItem.setVisible(true);
    } else if (line.startsWith("DISCONNECT")) {
    sendButton.setEnabled(false);
    return;
    } else if (line.startsWith("USERLIST")) {
              StringTokenizer st = new StringTokenizer(line.substring(8), " ");
              while (st.hasMoreTokens()) {
              usersHashSet.add(st.nextToken());
    listModel.removeAllElements();
    for (Iterator i = usersHashSet.iterator(); i.hasNext(); ) {
              listModel.addElement(i.next());
    } else if (line.startsWith("USERJOIN")) {
              String userJoinName = line.substring(8).trim();
              usersHashSet.add(userJoinName);
              listModel.addElement(userJoinName);
    } else if (line.startsWith("USERQUIT")) {
              String userQuitName = line.substring(8).trim();
              usersHashSet.remove(userQuitName);
    listModel.removeElement(userQuitName);
    } else if (line.startsWith("MESSAGE")) {
    messageArea.setFont(new Font("Lucida Sans", Font.PLAIN, 12));
    messageArea.append(line.substring(8) + "\n");
    catch (Exception e) {
    //e.printStackTrace();
    return;
    * Runs the client as an application with a closeable frame.
    public static void main(String[] args) throws Exception {
    ChatClient client = new ChatClient();
    client.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    client.frame.setLocation(200, 100);
    client.frame.show();
    client.run();
    class messageAreaPopupListener extends MouseAdapter {
    public void mousePressed(MouseEvent e) {
    maybeShowPopup(e);
    public void mouseReleased(MouseEvent e) {
    maybeShowPopup(e);
    private void maybeShowPopup(MouseEvent e) {
    if (e.isPopupTrigger()) {
    messageAreaPopupMenu.show(e.getComponent(),
    e.getX(), e.getY());
    class userAreaPopupListener extends MouseAdapter {
    public void mousePressed(MouseEvent e) {
    maybeShowPopup(e);
    public void mouseReleased(MouseEvent e) {
    maybeShowPopup(e);
    private void maybeShowPopup(MouseEvent e) {
    if (e.isPopupTrigger()) {
    userAreaPopupMenu.show(e.getComponent(),
    e.getX(), e.getY());

    Yes, the code is large, isn't it. It is a good idea, when you have a problem you can't solve, to remove unnecessary code. When the problem disappears, then you know the code you just removed was probably the source of the problem.
    But in your case, I think that none of the 1000 lines of code you posted are the problem. You appear to be using Lucida Sans, which is a positive sign; it can render many of the characters you have hard-coded in your program. But apparently the problem is with characters that are coming from somewhere else? And you are using a PrintWriter to send them there and a BufferedReader to get them back? These convert your data from characters to bytes and back again using the default encoding for your system. Chances are that this encoding is some "extended ASCII" encoding that doesn't know how to map anything above \u00ff. You need to get an InputStreamReader and an OutputStreamWriter into your transmission. (Wrap your socket.getInputStream() in an InputStreamReader and wrap that in a BufferedReader, etc.) These objects can take an encoding name as their second parameter; try "UTF-8" or "UTF8" for the encoding. Their API documentation has a link to a page about encodings; follow that if you need more info.

  • Problems loading images dynamically with XML

    Hi Everyone,
    I am working with a project that was build by another
    developer and I have been asked to modify it several ways. This is
    an interactive map for a hotel brand where when you click on the
    USA, you get a list of all the states, click a state and a list of
    all the hotels in that state comes up, click a hotel, the hotel's
    information is displayed. I understand the structure of the files,
    how they make them work, though I couldn't build it myself.
    The problem I am having is this. can't make the hotels'
    photos load into the flash through the XML. I created a target
    movie file that the image could load into but something is not
    happening as far as loading the images. I don't know if the movie
    clip that I created is the right way to go (it was made as an
    object in the library that is exported via AS), or if I should
    create one in the action script file that loads the XML data.
    I looked at some tutorials about how to load images with XML
    but those didn't get into the level of detail that I need for this
    project.
    I've attached some partial code to see if anyone can help me
    work through this.
    Any and all suggestions are welcome.
    Thanks for the help in advance.
    Jeremiah

    I'm a noob at AS3 and trying to learn this XML stuff myself,
    but i have been able to load pictures to the stage...this might
    help you...my xml file photo section is similar to yours, only I
    have it labeled as "href" instead of "source"...
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("xmldata/images.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    function xmlLoaded(event:Event) :void {
    xml = XML(event.target.data);
    xmlList = xml.children();
    for (var i:int = 0; i<xmlList.length(); i++) {
    imageLoader = new Loader();
    imageLoader.load(new URLRequest(xmlList
    .attribute("href")));
    imageLoader.x = 0;
    imageLoader.y = 0;
    addChild(imageLoader);

  • Problem loading certain pages with WRT54G2 router

    I recently had to password protect my wireless network (I live in the middle of nowhere and we got new neighbors who decided to leech off my internet), and since then have had trouble loading a handful of websites that I had previously been able to access. The websites also do not load on my mother's computer (same network) or on my phone (unless I use my cellular network and not my home's wifi). I have updated my router's firmware and reset it, but this has not fixed the issue. Could anyone help me with this?

    Make sure the internet thru the router is working. What you can do is hardwired the pc to the router and check if you can open a website then access the router's interface again and double check the wireless settings, personalize if possible the SSID and the wireless channel (3,6,9,11), also for the wireless security use wpa2 personal/ TKIP. If internet wired to the router is not working, connect the pc straight to the modem for isolation.

  • Problem loading jpg's with xml

    I have looked through the forum to see if my problem was
    raised but I could not find any topic that could help me out. So
    here's my problem.
    I have a simple photo viewer that load jpg's via xml.
    Everything work perfect when I preview the movie in Flash or on my
    desktop but as soon as it's uploaded to the server the jpg's so not
    load. And everything is placed correct on the server.
    Anyone got a clue why?

    Ok I found out that if you go directly to the movie in the
    browser (http//www.url.com/name.swf) then it work perfect and the
    photos load.
    I got two other movies in the same html document. It's surely
    here the problem occur. But why and what can I do to solve
    it?

  • Problem loading multiple rows with ADI

    Hello guys. I setup a custom integrator to use with WebADI. Even after unprotecting the sheet, only the rows that are within the border (only 10 records) are uploaded. I have updated the profile option "BNE Upload Batch Size". Before doing this it would give an error saying "Server could not complete the upload". Now it doesn't give an error but it doesn't load the other values in the sheet. Is there a way of increasing the black border where the data fits so it can load more data? Many thanks

    Hi,
    there are two options:
    1/ When you specify and define your layout you can also define how many rows you like to get in your excel sheet.
    2/ If you unprotect your sheet, you can always add rows in between the existing row area. I put always new rows between the existing row 9 and 10. This always works.
    Hope this helps
    br, Volker

  • Problem loading googlemaps v3 with stagewebviewbridge in Ios

    I have developed an application in Flex 4.6, using google maps v3 javascript through a html page on my server and stagewebviewbridge, the problem is that Andorid works perfect, but ios, load the map, but when the map is moved or do zoom only partially loaded, can anyone help me?
    the map is in html http://cellapps.eu/farmacias/mapaG.html
    map displayed in a browser works fine, as viewed from android, ios but when you move the map or zoom does not load completely

    Have you turned the phone off and on again?
    I'm not even kidding - this resolved the same issue for me yesterday.

  • Problem loading Ellen Podcast with 5G ipod

    I have a thirty gig Ipod video (the first release) and itunes says i cannot sync the ellen podcast because my ipod is not compatiable... What is the deal???

    I have the same problem with my fifth generation 80 GB iPod. I called Apple and they said that they cannot help with any specific podcasts because they are not responsible for how the podcasts are made. I expressed my surprise with this statement as the Ellen show is a featured show in the Apple Store Podcast section, but it does make sense. They can't be responsible for every podcast in their directory.
    You could try contacting the Ellen show and letting them know. I'm sure they'd fix it if they knew it was affecting a lot of people.
    PowerMac Dual 1.42 GHz G4   Mac OS X (10.4.7)  

  • Problem Loading an Image with javax Swing from a JApplet

    First of all, i use JCreator as java creater and have the newest version of java sdk version.
    Now i need to load an image from the harddrive on which the JApplet is located. I need to do this from inside the JApplet. I have put my pictures in a map 'images' which is located in the same directory as the classes + htm file. It works from inside JCreator, but as soon as i open the normal htm it just WON'T load that image (grmbl).
    Here is my code for loading the image:
    public BufferedImage loadImage (String filename, int transparency)
         Image image;
         if (app)
              image = Toolkit.getDefaultToolkit().getImage(("./images/"+filename));
         else
              String location = "";
              location = "./images/"+filename;
              image = Toolkit.getDefaultToolkit().getImage(location);
         MediaTracker mediaTracker = new MediaTracker(new Container());
         mediaTracker.addImage(image, 0);
         try
              mediaTracker.waitForID(0);
         catch (Exception e)
    Could anybody help me out here??
    I tried a url already using getCodeBase() or getDocumentBase() but that gives an error because it cannot find those if using a JApplet.

    Why don't you use javax.swing.ImageIcon? If you already have a flag telling if it's an application or applet, use the getDocumentBase() to base the URL in the applet part only.

  • Problem loading .swf embedded with HTML

    Hi All,
    I have embedded .swf file with HTML. It is working fine with
    win xp and win 2003. But not working on win 2000 server.
    I have set the MIME in IIS for .swf.
    Please let me know what setting I should configure.
    Thanks,
    Aung

    does container exit on the timeline that contains your code?
    is master.swf in the same directory with your flash swf and
    html?

  • When I try to access netflix, I get "problem loading page", only with netflix

    When I try to access netflix.com, I get a white screen with the message, Server Not Found. This only occurs with netflix

    Have you tried resetting all tools?

  • Mediasmart software problem loading onto computer with new hard drive and operating system

    My computer recently crashed and I had to buy a new hard drive and operating system.  None of the programs from the old hard drive were saved.  The computer is  an HP Pavilion dv7-3165dx Entertainment Notebook and I have Windows 7 Professional (64x) as the operating system.  Tried to download Mediasmart from the HP Web page to play DVD and Blu-Ray Discs.  The programs downloaded but will not install.  Any suggestions?

    waynesworld57 wrote:
    My computer recently crashed and I had to buy a new hard drive and operating system.  None of the programs from the old hard drive were saved.  The computer is  an HP Pavilion dv7-3165dx Entertainment Notebook and I have Windows 7 Professional (64x) as the operating system.  Tried to download Mediasmart from the HP Web page to play DVD and Blu-Ray Discs.  The programs downloaded but will not install.  Any suggestions?
    Hi,
    It looks like it's a common issue: http://h30434.www3.hp.com/t5/TX-TM-Series-Notebooks-Reply-Only/HP-Mediasmart-Software-package-for-Wi...
    Try VLC as a multimedia player: http://www.videolan.org/vlc/download-windows.html
    Dv6-7000 /Full HD/Core i5-3360M/GF 650M/Corsair 8GB/Intel 7260AC/Samsung Pro 256GB
    Testing - HP 15-p000
    HP Touchpad provided by HP
    Currently on Debian Wheeze
    *Please, help other users with the same issue by marking your solved topics as "Accept as Solution"*

Maybe you are looking for

  • To add a method on select of a date from a date input field

    Hi, I have a input field which is binded to context element, type date. Hence the output screen has a date popup, from which user can select any dates. Is it any way i can have a action executed on select of a date value? I mean when the user selects

  • Can't complete public folder migration, 2010 to 2013

    So I've been following both these: http://technet.microsoft.com/en-us/library/jj150486(v=exchg.150).aspx http://www.msexchange.org/articles-tutorials/exchange-server-2013/migration-deployment/migrating-public-folders-exchange-2013-part2.html I've loc

  • Table or view with the request status of all requests in a cube

    Dear all, I search the table or view which is used by Cube / Manage -> InfoProvider Administration (Requests). Target is to get all status information of all requests started by one InfoPackage. I found several tables alone but no view. I have curren

  • Ipad missing...pictures appearing in photo stream on iphone

    My ipad went missing last Sunday 3rd August whilst staying at my aunts house abroad. In the house it was just me, my aunt, my cousin and my 4 year old. No one had entered the house so we figured it must be in the house somewhere. My 4 year old did le

  • Undo send to back

    I added an image to a slide in my project and chose send backward and now it is appearing on all slides after that slide. I don't believe I inidcated it to appear for rest of project. If I did how do I do it. I cannot access the image when I click on