How to send really Chinese word, not the string "&# number " to web browser

Each Chinese word on page sending to web browser is translated to a string in form "&#<number>" by default, it's a problem when Chinese word is included in url. How to specify sending really Chinese word, not the string "&#<number>" to web browser?

Thanks that seems to make much more sense, still having some troubles though.
Ok so now the majority of it seems to be working and it seems to be sending the String just fine. And I'm having it send the String to the BufferedWriter "out" and then using the newLine() method to send a carriage return but the BufferedReader on "in" seems to not detect the carriage return.
I have it doing a readLine() so that (as I understand it) it should be blocking, waiting until an end of line character so I assume each call of newLine() should have it pick up something but a quick breakpoint shows that it never stops blocking on readLine().
I assume the connection is fine because the application running as server uses the socket object returned by the accept() method.
Is there something I've perhaps misunderstood about the BufferedReader's readLine() method?
Here's the new version of my netbeans project:
http://rapidshare.com/files/371224512/KerazehDood.rar
Also on a different line of questioning, I'm just wondering about socket convention.
I was thinking it'd be useful in a game similar to what I'm attempting to make to not only send player position information but also client keypress information, I was just wondering, if you're doing something like that would it be frowned upon to use two separate ports? I think it would make the implementation far more legible and easy to structure but wasn't sure if applications usually try to stick to only one port or not.
Thanks.
Edited by: ThePermster on Apr 2, 2010 10:54 AM

Similar Messages

  • How can I open multiple instances of the same folder and web browser in different desktops in Lion?

    I've selected "none" for association but it doesn't work. In other words, I have a Dropbox folder on my desktop. I'd like to be able to open that same folder using the same shortcut on different Lion desktops. However, whenever I try to use the same shortcut on a different desktop, it switches to the one where it's already open. Same problem with web browsers; if I try to just click on a web browser to create a new window, it will take me back to the other desktop.
    I didn't have this problem before I had to replace my hard drive and update everything again. I am aware of the "restart Finder" option as well as associating programs with individual desktops. All of the things in question are currently selected as "none."
    Any help would be greatly appreciated!

    I just set Safari's option to None. That is I right clicked on the dock, selected options, and chose none. Also, in Mission Control's tab of System Preferences I clicked Off When switching to an application, switch to a space with open windows for that application. That let me open a new Safari window no matter what desktop I was in. But I had to do both. Just setting the desktop option to none didn't seem to do it. Finder seems to work okay with just the none option set.

  • How to send a mail by ckicking the button using java

    hi,
    how to send a mail by clicking the button (like payroll silp in that contain one button if we click that it autometically go through the mail as a attachment) pls frd to me my gmail is [email protected]

    Hi,
    It seems we are doing the homework for you; to make you start with something; look at the sample code below and try to understand it first then put the right values
    to send an email with an attachement.
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    public class Main {
          * @param args
         public static void main(String[] args) {
              // Create the frame
              String title = "Frame Title";
              JFrame frame = new JFrame(title);
              // Create a component to add to the frame
              JComponent comp = new JTextField();
              Action action = new AbstractAction("Button Label") {
                   // This method is called when the button is pressed
                   public void actionPerformed(ActionEvent evt) {
                        System.out.println("sending email with attachment");
                        sendEmail();
              // Create the button
              JButton button = new JButton(action);
              // Add the component to the frame's content pane;
              // by default, the content pane has a border layout
              frame.getContentPane().add(comp, BorderLayout.SOUTH);
              frame.getContentPane().add(button, BorderLayout.NORTH);
              // Show the frame
              int width = 300;
              int height = 300;
              frame.setSize(width, height);
              frame.setVisible(true);
         protected static void sendEmail() {
              String from = "me@localhost";
              String to = "me@localhost";
              String subject = "Important Message";
              String bodyText = "This is a important message with attachment";
              String filename = "c:\\tmp\\message.pdf";
              Properties properties = new Properties();
              properties.put("mail.stmp.host", "localhost");
              properties.put("mail.smtp.port", "25");
              Session session = Session.getDefaultInstance(properties, null);
              try {
                   MimeMessage message = new MimeMessage(session);
                   message.setFrom(new InternetAddress(from));
                   message.setRecipient(Message.RecipientType.TO, new InternetAddress(
                             to));
                   message.setSubject(subject);
                   message.setSentDate(new Date());
                   // Set the email message text.
                   MimeBodyPart messagePart = new MimeBodyPart();
                   messagePart.setText(bodyText);
                   // Set the email attachment file
                   MimeBodyPart attachmentPart = new MimeBodyPart();
                   FileDataSource fileDataSource = new FileDataSource(filename) {
                        @Override
                        public String getContentType() {
                             return "application/octet-stream";
                   attachmentPart.setDataHandler(new DataHandler(fileDataSource));
                   attachmentPart.setFileName(filename);
                   Multipart multipart = new MimeMultipart();
                   multipart.addBodyPart(messagePart);
                   multipart.addBodyPart(attachmentPart);
                   message.setContent(multipart);
                   Transport.send(message);
              } catch (MessagingException e) {
                   e.printStackTrace();
    }The sample above is not ideal so you need to go through it and start to ask me some questions if you have
    Let me know if you miss something
    Regards,
    Alan Mehio
    London,UK

  • How can I add a word to the dictionary?

    How can I add a word to the dictionary on my iPhone 6 plus?
    Thanks.

    There's not an option to add a word to the dictionary. However, after typing that word several times, it will start to recognize it and offer it as a suggested word.

  • How to key in chinese word

    how to key in chinese word in safari

    hj_lee99 wrote:
    how to key in chinese word in safari
    Go to system preferences/keyboard/input sources and use the + button, and then the "add" button to add one of the Chinese input methods.  You need to choose whether Traditional or Simplified and then pinyin or something else.  Then select Chinese in the "flag" menu at the top right of the screen.
    A  site devoted to this is at
    http://www.yale.edu/chinesemac

  • HT201363 I don't remember my two security questions and I saw where you could send it to your email but the email it shows I could send it to is not the email I set up with it is there a way I can change the email on there to send to the email I have

    I don't remember my two security questions and I saw where you could send it to your email but the email it shows I could send it to is not the email I set up with it is there a way I can change the email on there to send to the email I have?

    The Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    An alternative to using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • I started my update for ios 5.1for iPhone 4s and cancelled it have way through now it says it's downloaded but really it's not the update is still there and when I try to update it it says unable to install update : an error occurred installing iOS 5.1  ?

    I started my update for ios 5.1for iPhone 4s and cancelled it have way through now it says it's downloaded but really it's not the update is still there and when I try to update it it says unable to install update : an error occurred installing iOS 5.1  ?

    See Here... Unable to Update or Restore...
    http://support.apple.com/kb/HT1808

  • I deleted a contacts number and replaced it.  But when I go to send a text it is the old number showing but I cannot find it in my phone contacts  Why and how to remove

    Hi
    I had to change a contaxts mobile number so deleted the contact and replaced with new number.  Somehow when I try to send a text it is the old number showing.  Why is it stil showing and how can I remove.   This is the same with some of the itunes which have copied over but again I cant remove.   When I sysnc to computer it tells me that this is a new computer, which it is and it wants to delete everythign. I dont want that can anyone help with these few problems.

    You will have to try Recovery Mode.
    Read this: http://support.apple.com/kb/ht1808
    Follow the instructions very carefully.

  • How to send a modulate signal by the NI PXI-5441?

    How to send a modulate signal by the NI PXI-5441?
    I am using NI PXI-8108 / PXI-5441.
    I want to send a binary signal modulated (FSK) by the 5441. I tried to use, without success, the modulation VIs with the Fgen VI.
    Thanks

    Hi Mauro,
    the code structure is similar to any structure of I/O. You need open the communication channel with the hardware (using VI Open), use VI Write/Read to send/receive data and close the reference (VI Close). You can look the structure in LV examples.
    Nevertheless, if you cannot, post your code that I analize to you.
    Regards,
    Ricardo Ramos
    Engenheiro de Vendas - Sul
    National Instruments Brasil

  • How could it be possible to check the product number here to find that it is not factory reject?, How could it be possible to check the product number here to find that it is not factory reject?

    How could it be possible to check the product number online to find that it is not factory rejection?
    My product is Iphone 5 by the way.

    <https://selfsolve.apple.com/agreementWarrantyDynamic.do>

  • Can i use chinese words in the iphoto ?

    can i use chinese words in the iphoto ?

    Yes.  The usual Chinese keyboard can be accessed from within iPhoto.

  • HT201328 My nephew give me the iphone and i'm not sure about the carrier. how i can get this information using the imei number?

    My nephew give me the iphone and i'm not sure about the carrier. how i can get this information using the imei number?

    If you have the iPhone in front of you, here's how you can learn the carrier:
    Go to Settings > General > About and look at the "Network" row near the top.  There's your carrier's name!

  • I purchased Photoshop Element online 1/19/2015 and have AD015439775 number but not the serial number.  How do I get the serial number, please?

    I purchased Photoshop Element online 1/19/2015 and have AD015439775 number but not the serial number.  How do I get the serial number, please?

    Redemption Code Help
    Mylenium

  • I bought lightroom and need to register my student id, how do i do that, the trial has run out, i have the product code but not the serial number?

    i bought lightroom and need to register my student id, how do i do that, the trial has run out, i have the product code but not the serial number?

    If you purchased a package then there should have been instructions in the box on how to submit your academic credentials. If you purchased online from Adobe then you should have received instructions in an e-mail. But here is a link that might help you. There is a link under Step 2 that will take you to a place where you can enter the information, I think.
    Adobe - Adobe Education Store : Proof of Academic Indentification

  • How can you minimize or (turn) off the "side panel" in Web Intelligence in the view mode.

    How can you minimize or (turn) off the "side panel" in Web Intelligence in the view mode.
    It is possible to turn on/off options within the Side Panel by Customization of Groups.
    But it seems You cannot influence the way Web Intelligence present (minimized or Off) the Side Panel in the IE??
    Is there a solution for this??
    If not, it would be a nice property of a Web Intelligence document in a future release.

    Hi Nico,
    we patched up to BI 4.1 SP 3 Patch 2
    and look look
    click side panel to minimize
    so .. patch patch ...

Maybe you are looking for

  • Report Builder Question: Printing PO's from E-Business Suite - POXPRPOL

    I'm hoping there's someone who has the time to help me: We are using Report Builder 9, Oracle 9i, and E-Business Suite 11.5.10. I am a new developer using Oracle, and need to make some changes to the seeded (default) POXPRPOL (Purchase Order Print -

  • I'm unable to send mail please can someone help me fix it

    I have suddenly started to get an error message when sending some of my mail it is telling me to go to my "Temporary Directory Settings" as it's unable to send through C:\Users\Tina\AppData\Local\Temp\nsmail.tmp I have tried unticking my email attach

  • Help. I have problem with BPS variable

    I have an attribute filled by USER_EXIT. When I try to start planning I get too many cells. It looks like my format has no restrict values! I saw variable values and there were right. What can be wrong??

  • XMP and Premiere

    Is it possible to custom script with the xmp sdk module an interface to work with adobe premiere to do the following. Im trying to attach and embed certain keywords and descriptions and iptc data info into a digitized video file during the digitizing

  • Biztalk MQSeries issue with whitespace characters

    We have a Biztalk 2010 implementation that is putting messages onto a MQSeries (v 7.1) Queue.   Sometimes the messages have a "/r" or "/n" embedded in an xml element typed as xsi:string.   When the message is put onto the MQSeries Queue the "/r" or "