Problem with encoding

Hello,
My app is reading a file, extracting a part of it to a byte array and, afterwards, the byte array is being converted to a string and later to a file, the problem i'm having is that some characters aren't recognized in the final version, e.g., �, �, �, and are replaced by '?', i guess it's some problem with the encoding, can someone help me with the workaround?
Thanks in advance for any help you can give me.

Multi-Post
http://forum.java.sun.com/thread.jspa?threadID=737681&tstart=0

Similar Messages

  • Problem with encoding of xml document

    while parsing an xml document with SAX parser, i found that encoding of the xml document received as input stream is "ISO-8859-1" . After parsing certain fields has to be stored in the mysql table where table character set is "utf8" . Now what i found that ceratin characters in the original XML document are stored as question mark (?) in the database.
    1. I am using mysql 4.1.7 with system variable character_set_database as "utf8". So all my tables have charset as "utf8".
    2. I am parsing some xml file as inputsream using SAX parser api (org.apache.xerces.parsers.SAXParser ) with encoding "iso-8859-1". After parsing certain fields have to be stored in mysql database.
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - � and the problem is that words like can�t are shown as can?t by database.
    4. I notiicied that parsing is going on well and character code is 146 while parsing. But when i reterive it from the database using jdbc it shows character code as 63.
    5. I am using jdbc to prepared statement to insert parsed xml in the database. It seems that while inserting some problem occurs what is this i don't know.
    6. I tried to convert iso-8859-1 to utf-8 before storing into database, by using
    utfString = new String(isoString.getBytes("ISO-8859-1"),"UTF-8");
    But still when i retreive it from the databse it shows caharcter code as 63.
    7. I also tried to retrieve it using , description = new String(rs.getBytes(1),"UTF-8");
    But it also shows that description contains character with code 63 instead of 146 and it is also showing can�t as can?t
    help me out where is the problem in parsing or while storing and retreiving from database. Sorry for any spelling mistakes if any.

    duggal.ashish wrote:
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - ’ and the problem is that words like can’t are shown as can?t by database.http://en.wikipedia.org/wiki/ISO8859-1
    Scroll down in that page and you'll see that the character code 146 -- which would be 92 in hexadecimal -- is in the "unused" area of ISO8859-1. I don't know where you got the idea that it represents some kind of apostrophe-like character but it doesn't.
    Edit: Actually, I do know where you got that idea. You got it from Windows-1252:
    http://en.wikipedia.org/wiki/Windows-1252
    Not the same charset at all.

  • [CS3 - JS - Mac] Problem with encoding

    Hi,
    I made a script that perform a lot of actions on ID.
    Everytime this script performs an action it writes a line on a global variable and at the end of the script write this var into a text file ( in the Document folder).
    Yes, it's a log file...
    While I was testing this script through the Toolkit everything went right.
    Then I added a menu action inside the script to call the script from the application and something strange happened, in the log file (wich is a text file UTF8 encoding) and also in the alerts ID shows. Both display text from this:
    "È necessario effettuare una selezione" (running the script from the toolkit)
    to this:
    "È necessario effettuare una selezione" (running the script from ID menu)
    So I think it's an encoding problem...
    I just added this code:
    #targetengine "Lele";
    var Lele_menu = app.menus.item("Main").submenus.add("Lele");
    //     Menu
    var main_action = app.scriptMenuActions.add("Update");
    var main_event_listener = main_action.eventListeners.add("onInvoke", function(){main();});
    var main_menu = Lele_menu.menuItems.add(main_action);
    //     Functions
    What's the point?
    Hope you understood.
    Thanks!
    Lele

    I had problems with UTF encoding so I use this function to write the log file:
    var log_file = new File(file_path);
    log_file.encoding = "UTF8";
    log_file.lineFeed = "unix";
    log_file.open("w");
    log_file.write("\uFEFF" + text_var);
    log_file.close();
    Where text_var is the log string.
    When it's written form the ESTK everything is right, when called from the menu it isn't.
    It's strange that it also involves alert text innit?

  • A peculiar problem with encode url

    Hi,
    I have the following code snippet in jsp
    <a href="<%=urlencoder.encode("cxc.jsp?P1=RWDS") %">> Rewards</a>
    But when this page is requested, the oracle application server responds with response 404 stating requested url not found.we aer using oracle application server 10g release 2.
    But without encoding the response is correctly displayed.
    has it got to do anything with encoding? or will it be required to change the code.
    But the same encoded url works perfectly fine on iplanet application server.
    Thanks in advance

    I was able to solve this by including the google code in an external PHP file as well. However if my template has a repeating region in it, and my contribute user adds a region from it, it breaks the code again :/
    Are there any other suggestions out there??

  • Problem with encodeing

    hi all,
    i have a problem with JNDI pooling
    everything apear to be ok
    but when i insert a UTF String into database the string appear a ??????????
    I know that i must set the charset for the connection to utf
    but i dont know how to set it in JNDI
    i use this code to do it :
    this code is getConnection() method
    Context ctx = new InitialContext();
    if(ctx == null ) {     
          throw new Exception("Boom - No Context");     
    Connection conn = null;
    ds = (DataSource)ctx.lookup("java:comp/env/jdbc/jdbc/myDB");    
    if (ds != null) {          
         conn = ds.getConnection(); // get connection from datasource pool
    return conn;this the web.xml
                      <resource-ref>
                   <description>DBConnection</description>
                   <res-ref-name>jdbc/myDB</res-ref-name>
                   <res-type>javax.sql.DataSource</res-type>
                   <res-auth>Container</res-auth>
                 </resource-ref>and this the server.xml
                     <Context path="/myPath" docBase="myDocBase" debug="5" reloadable="true" crossContext="true" source="org.eclipse.jst.j2ee.server:myDocBase">
                          <Resource name="jdbc/myDB"
                                                     auth="Container"
                                                     type="javax.sql.DataSource"
                                                     maxActive="100"
                                                     maxIdle="30"
                                                     maxWait="10000"
                                                     username="$$$"
                                                     password="$$$"
                                                     driverClassName="com.mysql.jdbc.Driver"
                                                     url="jdbc:mysql://localhost/myTest" />
                     </Context>Edited by: daigoor on Jul 1, 2010 5:49 AM
    Edited by: daigoor on Jul 1, 2010 5:59 AM
    Edited by: daigoor on Jul 1, 2010 7:32 AM

    the solution was to set the characterEncoding in the url in server.xml
    even i try it before but the server was not started
    he tell me that i must insert a ";" after password
    finally i found that the xml file does not understand the char "&" as it so the server was not started
    i search about this char in xml and found that it must be written as "&"
    i try this code and its work fine
    <Context path="/myDB"
                  docBase="myDB"
                  debug="5"
                  reloadable="true"
                  crossContext="true"
                  source="org.eclipse.jst.j2ee.server:myDB">
                     <Resource name="jdbc/MYdbcomhDS"
                                             auth="Container"
                                             type="javax.sql.DataSource"
                                             maxActive="100"
                                             maxIdle="30"
                                             maxWait="10000"
                                             driverClassName="com.mysql.jdbc.Driver"
                                             url="jdbc:mysql://localhost/mydb?user=$$$&password=$$$&characterEncoding=UTF8" />
    </Context>thank you for help
    Edited by: daigoor on Jul 4, 2010 4:25 AM

  • Problem with encoding euro sign in simple select

    select '€' from dual;
    should fulfill the requirements mentioned in
    http://www.oracle.com/technology/products/database/sql_developer/files/relnotes_v121.html#sec4
    But the Euro sign is displayed as a result only when connected to a DB with UTF8 encoding. When connected to a SBCS DB with encoding WE8MSWIN1252, ¬ is displayed instead. chr('€') displays 172, which is equal to the last byte of the UTF8 representation of the Euro sign \u20ac = e2 82 ac.
    The Euro sign is included in WE8MSWIN1252 with code 128, so I would expect the result of "select '€' from dual " to display correctly in both cases.
    I have just downloaded the current version Oracle SQL Developer 1.2.1, java version is 1.6.0_02-b06.

    This is what I am trying to establish. This forum is about Oracle SQL Developer, so the example was for SQL Developer. Yes, you do not need the feedback on command.
    My point is that for a number of my colleagues, all using the database encoding WE8MSWIN1252, we do not see the upside down question mark. In SQL Developer, we see the correct Euro symbol.
    I will continue to investigate this issue.
    I have tested this using NLS Settings for German, France, Ireland, United Kingdom and America, for my database with encoding WE8MSWIN1252. These all display the correct euro symbol and not an upside down question mark, whether I use the data tab in the table definition grid, or by running F9(run statement) or F5 (run script) in the SQL Worksheet in SQL Developer.
    You do not need to send me any configuration files. Just confirm that you are on the latest release , 1.2.1.32.13 and have not replaced any files once you installed this release. I will also work with our internationalization team to track down the issue. Currently the only difference is the Java version you are using.
    Sue

  • Problems with encoding and files

    Hi friends pls some help my problems is the following
    I have a ftp server running on linux and in my program I download files from the ftp server using class specified below.When I download the file content not all content is coming ok. For example I have a string with
    Ra�l����1234%#=?[a_@ and when I read content using my methods this part is retirved ok Ra and this one is retrived wrong �����
    whith characteres very stranges.
    I suppose that the problem is with the encoding, then all day I tried some settings in the class new InputStreamReader.First the encoding UTF-8 because I have created the file using this encoding. Something like this:
    in = new InputStreamReader(new GZIPInputStream(localFtp.get(serverFile)),"UTF-8");
    but does not work
    After I realized that I use the statement localFtp.ascii();
    declaring that the content will be downloaded in ascii encoding so
    I made this change :
    in = new InputStreamReader(new GZIPInputStream(localFtp.get(serverFile)),"US-ASCII");
    but still does not work
    Please somebody can help me this is very urgent
    Here is my code
    Tkx
        code:
    {code}
    import sun.net.ftp.FtpClient;
    import java.util.ArrayList;
    import java.util.Vector;
    import java.io.*;
    import java.util.zip.*;
    * This is a basic wrapper around the sun.net.ftp.FtpClient
    * class, which is an undocumented class which is included
    * with Sun Java that allows you to make FTP connections
    * and file transfers.
    * <p>
    * Program version 1.0. Author Julian Robichaux, http://www.nsftools.com
    * @author Julian Robichaux ( http://www.nsftools.com )
    * @author Jpuerta (modified by)
    * @version 1.0
    public class SunFtpWrapper extends FtpClient {
         * Methods you might use from the base FtpClient class
         * // set the transfer type to ascii
         * public void ascii()
         * // set the transfer type to binary
         * public void binary()
         *// change to the specified directory
         * public void cd(String remoteDirectory)
         * // download the specified file from the FTP server
         * public TelnetInputStream get(String filename)
    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.ArrayList;
    import java.util.Vector;
    import java.util.ResourceBundle;
    import java.util.regex.Pattern;
    import java.util.zip.GZIPInputStream;
    import org.apache.log4j.Logger;
    import org.apache.log4j.PropertyConfigurator;
    import com.banesco.lynx.common.SunFtpWrapper;
    import com.banesco.lynx.exceptions.FtpManagerException;
    import org.apache.log4j.Logger;
    import org.apache.log4j.PropertyConfigurator;
    public class FtpManager extends SunFtpWrapper{
         ProcessParametersHelper parametersManager=ProcessParametersHelper.newInstance();
         ResourceBundle rb = ResourceBundle.getBundle("com.banesco.lynx.exceptions.lynx_exceptions");
         private Logger logger =null;
         public FtpManager(int i) throws FtpManagerException {          
              logger = Logger.getLogger(FtpManager.class);
              PropertyConfigurator.configure(parametersManager.getLog4j_path());
              //0 connect to source server
              //1 connect to destiny server
              if(i==0)               
                   connectToSourceServer(this);
              else if (i==1)
                   connectToDestinyServer(this);     
         private void connectToSourceServer(FtpManager ftp)throws FtpManagerException{
              try{          
                   ftp.openServer(parametersManager.getSourceServerInfo().getIp());
                   ftp.login(parametersManager.getSourceServerInfo().getUserName(), parametersManager.getSourceServerInfo                ().getPassword());
              catch (IOException e) {
                   //log error
                   logger.error("Ha ocurrido un error la descripcion del error es :" + e.getMessage());
                   throw new FtpManagerException(Integer.toString(FtpManagerException.CRITICAL),rb.getString                              ("error.ftpmanager.openconnection"));
         private void connectToDestinyServer(FtpManager ftp)throws FtpManagerException{
              try{          
                   ftp.openServer(parametersManager.getDestinyServerInfo().getIp());
                   ftp.login(parametersManager.getDestinyServerInfo().getUserName(), parametersManager.getDestinyServerInfo               ().getPassword());
              catch (IOException e) {
                   //log error
                   logger.error("Ha ocurrido un error la descripcion del error es :" + e.getMessage());
                   throw new FtpManagerException(Integer.toString(FtpManagerException.CRITICAL),rb.getString                              ("error.ftpmanager.openconnection"));
         public ArrayList downloadFileIntoMemory (String path,String serverFile, boolean isZipped) throws FtpManagerException {
              int i = 0;
              InputStreamReader in = null;
              ArrayList response = new ArrayList();
              FtpManager localFtp=null;
              try{          
                   localFtp=new FtpManager(0);
                   localFtp.cd(path);
                   //TODO modifico encoding
                   // moving file content from ftp server into memory
                   if (isZipped)     
                   {  localFtp.binary();
                   in = new InputStreamReader(new GZIPInputStream(localFtp.get(serverFile)));
                   else
                        localFtp.ascii();               
                        in = new InputStreamReader(localFtp.get(serverFile));
                   // moving file content from memory into arraylist
                   BufferedReader reader = new BufferedReader(in);          
                   String l = null;
                   while ( (l = reader.readLine()) != null)
                        response.add(l);
              catch(IOException e){
                   //TODO quitar esto
                   e.printStackTrace();
                   //log error               
                   logger.error("Ha ocurrido un error la descripcion del error es :" + e.getMessage());
                   throw new FtpManagerException(Integer.toString(FtpManagerException.CRITICAL),rb.getString                    ("error.ftpmanager.downloadfile"));
              catch (FtpManagerException e) {
                   //log error
                   logger.error("Ha ocurrido un error la descripcion del error es :" + e.getMessage());
                   throw new FtpManagerException(Integer.toString(FtpManagerException.CRITICAL),rb.getString                ("error.ftpmanager.downloadfile"));
              finally{
                   try{
                        localFtp.disconnect();
                   }catch(FtpManagerException e){
                        //log error
                        logger.error("Ha ocurrido un error la descripcion del error es :" + e.getMessage());
                        throw new FtpManagerException(Integer.toString(FtpManagerException.CRITICAL),rb.getString      ("error.ftpmanager.closeconection"));
              return response;

    Err.. GZIP files are not text files so why are you trying to read them using Readers?

  • Problem with encoding and charset for downloading a file

    Hi guys, I have a problem and I beg for your help, I am 1000% frustrated at this point.
    I have a servlet which have to do something and give a file log to the final user. Coding the logic for that took me about 5 minutes, the problem is that the given file doesnt shows properly in notepad (Default app to open txt files). I have tried every way I have read over the internet and absolutely nothing works.
    After trying about 20 different ways fo doing this without success, this is my actual code:
    Charset def=Charset.defaultCharset();
    OutputStreamWriter out = new OutputStreamWriter(servletOutputStream,def);
    for (String registry:regList) {
    out.write(registry+"\n");
    out.close();
    the page gives the file to the user, I can download or open it, when I open it this is the result
    registry1registry2registry3registry4registry5registry6registry7...
    and I am expecting:
    registry1
    registry2
    registry3
    registry4
    registry5
    If I open it with wordpad or notepad++ the file looks fine, but I cant achieve that notepad reads it correctly. I have spent about 10 hours on this and at this point I just dont know what to do, i have tried Windows-1252, UTF-8, UTF-16, the Default one. I have tried to set this enconding on the response header with no luck. Any help will be very appreciated.
    Thanks in advance.

    >
    I have a servlet which have to do something and give a file log to the final user. Coding the logic for that took me about 5 minutes, the problem is that the given file doesnt shows properly in notepad (Default app to open txt files). I have tried every way I have read over the internet and absolutely nothing works.
    If I open it with wordpad or notepad++ the file looks fine, but I cant achieve that notepad reads it correctly. I have spent about 10 hours on this and at this point I just dont know what to do, i have tried Windows-1252, UTF-8, UTF-16, the Default one. I have tried to set this enconding on the response header with no luck. Any help will be very appreciated.
    >
    Your file likely uses *nix style line endings and use a single LF (0x0A) as the end of each line.
    Notepad doesn't recognize a single LF as the end of line; it expects CRLF (0x0D0A). The encoding isn't the issue.
    If you have to use Notepad you will need to add code to find all of the LF characters and insert a CR character in front of them.

  • Problems with encoded parenthesis in URL of BSP application

    Hi,
    our BSP application has following url:
    http://sap-host/sap/bc/bsp/sap/zapp/index.html
    After login we addionaly get a parentheses-part in the url (url mangling):
    http://sap-host/sap(bD4JHFSIBSF==)/bc/bsp/sap/zapp/index.html
    Everything works fine as far as we access the sap-host dircetly. When we want to access over Websphere-Portal with a proxy-servlet (reverse-proxy), the login is correct and after login we get an error 404 (not found). This happens because the proxy encodes the parentheses in the url with %28 and %29. Another problem is, that i have no chance to change the proxy-configuration, because it´s not in my responsibility.
    Is there any possibility to get the icm/icf work with these encoded parenthesis?
    I didn´t find anything helpful in the sdn/forums/wiki...
    Thx a lot!

    Hi,
    You have to manage the URL mangling when using reverse proxies.
    For exemple with Apache as a reverse proxy you need this kind of rewrite rule :
    RewriteRule  ^/(sap\(.*)    https://internalHost:internalPort/$1  [P,L]
    If you have no chance of changing the proxy configuration, you are in trouble...
    Good luck !
    Olivier

  • Problems with encoding when creating link in mail

    A user inputs some text in a field at a webpage.
    From this I build a mail that has a link that looks like this:
    http://www.domain.com/a/controller/action/?name=[INPUT VALUE]
    My problem is that when I try to get the value in the receiving action, using params.name, it does not so good. The real problem is about odd characters like our swedish �,�,� for example.
    What I have tried to do when building the link is to use URLEncoder.encode([INPUT VALUE], 'UTF-8') and then using URLDecoder.decode(params.name, 'UTF-8') but it does not work at all. Is there any other way I should attack this problem?

    def name = "Mattias Sands�ter";
    def email = params.email;
    name = URLEncoder.encode(name, 'UTF-8');
    println(name)
    def message = http://domain.com/a/b/download/?name=" + name
    MailSender.sendMail(email, "Subject", message);{code}
    {code}def download = {
    println(params.name)
    println("download after decode" + URLDecoder.decode(params.name, 'UTF-8')){code}
    The first println looks fine, it says Mattias+Sands%C3%A4er
    The second println looks horrible, Mattias Sands��ter
    The third looks the same.
    Then I send this to my gsp(jsp) page and wants to put this in a standard textfield, but it of course looks like Mattias Sands��ter there too.
    This is on a linux-server, on my local computer, everything works as expected.
    Whatever it its, something happens to the name-variable when it is clicked on in the e-mail. It looks good in the e-mail, get pasted in the address-field in the browser correctly, but when retreiving the variable with params.name it is screwed
    Edited by: sandsater on Jul 8, 2008 8:44 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with Encoding Audio

    Hi!
    When creating my DVD, iDVD will be stuck at the stage where it displays "Encoding Audio", which is probably the last stage of the producing process. Both the right click menu of iDVD on the dock and the Activity Monitor displays "Not Responding".
    I've tried exporting my DVD to a disk image many times already and it is always stuck at that point.
    Past DVD (images) are successful, but this one is not.
    Except that, I've noticed that I have 22.7GB of Hard Disk space before I've exported the DVD image. But after I force-quitted iDVD, I only have 16.25GB remaining, and I don't see new files. How can I delete the probably hidden file?
    What can I do?
    Please help. Thank You!

    I'm having the same problem. I make a movie using iMovie, and then share it to iDVD. The process of making the DVD goes along smoothly through the step of processing the audio track, and then iDVD locks up and I have to force quit iDVD. It used to work ok, now it does it every time I try to burn a DVD. It processes the video resources fine. It just snags as soon as it gets to the process audio step. I use the latest version of iLife on a iBook G4 (14 inch model) with 1 Gig of RAM.

  • Having problems with encoder readings due to motor commutation noise

    Hello everyone,
    I wanted to ask for advice with a hardware problem which I believe is rather usual.
    Here I describe my application:
    We are controlling an electric actuator for a robotics application. We are using encoders to take position readings and we need to perform analog acquisition for other measurements (such as force measured with strain gauges).
    The problem is:
    In summary, I am having problems to acquire properly position readings from a quadrature linear encoders and also some analog inputs. The cause  is the commutation noise generated by the motor drive we are using (which is a brushless dc motor Moog BN-23-23).
    Our acquisition platform is a NI PXI-8106 with a PXI-1042Q chassis. We have two possibilities to acquire the signals. We have a multifunction DAQ M series NI PXI-6259 and a FlexRIO NI PXI-7951R with a DIO module NI PXI-6581R.
    The commutation noise have a frequency of 30 kHz. In an oscilloscope we can see a series of noise peaks that are only present during a short period of time (about 1/10 of the period of the noise). The rest of the time the noise is not present.
    The Accelnet amplifier module that feeds the electric motor provides us with a clock signal synchronized with the noise (which frequency is about 1/4 of the noise frequency). This clock signal provides a mean to solve the problem of the analog acquisition. We can use this clock to perform a buffered acquisition with an external clock in LabView connecting the clock to a PFI pin or to the FPGA card. But the noise is also corrupting this clock signal (we get a daqmx error warning us about possible glitches in the clock signal, and also stopping the acquisition). I believe that solving the encoder problem we can solve also the analog acquisition problem.
    In the encoder readings the noise is making our counter count upwards or backwards gradually rather fast. We can get an increase in position of about 10 cm/second without any appreciable movement in the linear actuator.
    It would be of great help if anyone could post the solution he is using to solve this problem.
    Thanks in advance for your help,
    jespestana
    PS: I insist in my belief that we are having a hardware issue, because we are only having bad readings when the electric motor is working. I am convinced so because we have already performed encoder and analog readings using other drives, such as hydraulic cylinders. Thus, I think that it is not a problem of our software (of our LabView VI).
    Solved!
    Go to Solution.

    Hi jespestana,
    I'm not sure why the noise would be causing your encoder measurement to increment more slowly...  However I do have one suggestion on the M Series board (6259):
    The M Series cards have built-in digital filtering on the PFI lines (see the M Series User Manual).  It sounds like the noise is a series of ~3 us pulses (1/10 of 1/30 kHz).  One of the available filtering frequencies that you may set on your M Series is 6.425 us, which should ignore any pulses (high or low) that are less than 6.425 us. You may set digital filtering with a DAQmx Property Node:
    A caveat is that the driver only allows you to configure digital filtering for counter inputs on M Series devices.  So, you could use digital filtering directly on your encoder task but not for your AI Sample Clock.  A workaround can be found here, which involves configuring a dummy counter task to set the PFI filter for your AI task.  If you're using the same PFI line for your encoder and AI task, you should just be able to set the PFI filter through the encoder task and not worry about the workaround.
    With regards to the Flex RIO, I believe you could implement something similar on the FPGA, but I'm probably not the best person to comment about this.  It would likely be a great deal more work than using the built-in filtering of the DAQmx API.
    Best Regards,
    John Passiak

  • Problems with encoded videos

    I tried converting movies with Videora iPod Converter, and converted videos cannot be added to iTUnes library.
    I used different profiles, set framerate to 29,97, tried both MPEG-4 and H264 formats.
    Dragging converted videos to iTunes with '+' symbol next to mouse arrow has no effect, 'Add to Library' option in File menu has no effect.
    What could be the cause of this problem? I think that videos are converted in proper format - I used different profiles and even tried some suggested changes, like setting the output framerate manually.
    Thank you.
      Windows XP  

    The problem seems to be with long videos, as music videos are always recongnized by iTunes, and none of the movies I converted were recognized yet.
    Any suggestions?
    Thanks
      Windows XP  

  • Problem with encoding..pls have a look at this.

    i'm getting data posted to a servlet in this format.
    Content-Type: application/octet-streamContent-Transfer-Encoding: binary&#934;&#9829; &#9787; &#9787;
    &#9829; d e &#9562; &#9556; ,&#9786; -&#9786; ?&#9786; �&#9786; &#8992;&#9786; &#8993;&#9786; X&#9787; Y&#9787; &#9565;&#9787; &#9564;&#9787; * &#9786; &#9794; * S P E C C Y
    ~&#9787;&#9786; &#9829; &#9792; &#9644; &#9786; � S P E C C Y ~&#9787;&#9787; &#9786; &#9787; &#9794; � &#9660; &#9787; B S P E C C Y ~&#9787;&#9786; &#9829; &#9830; &#9835; &#8593; " &#9786;
    how can i get the string equivalent of this.?
    i tried the following codes to receive the data.
    InputStream in = request.getInputStream();
    BufferedReader br = new BufferedReader(     new InputStreamReader(in));
         String strdata=null;
            String receivedData="";
             do
                  strdata=br.readLine();
                  if(strdata!=null)
                       receivedData+=strdata;
                  System.out.println(strdata);
             while(strdata!=null);
             byte[] receivedDataBytes=receivedData.getBytes();Also i tried this
    BufferedInputStream bis=new BufferedInputStream(in);
             bis.read(data, 0, 330);still its not working...pls help!!!

    yes i'm the server.
    client is a hardware device and it posts data to the url which is a servlet.
    the client sets some custom headers and the body
    i was able to read the headers set by the client.
    but the body part comes like this.
    Content-Disposition: form-data; name="data"
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binarythese were also there in the body part but i was able to read them as meaningful strings..
    i need to submit the status by today.
    i can't say them that i could read the data...
    i need to tell soem valuable reasons..
    pls help!!

  • Simple problem with encoding

    Which encoding does HTTP use ?
    I'm building a web-site.
    A response to a question asked to the client is given in a HTML text field.
    My HTML page uses utf-8 encoding.
    This response is transmitted to a servlet as an HTTP request parameter.
    When this response contains characters as '�' or '�' (french characters), these characters are replaced by others in the result of the request.getParameter(...) method in the doGet() of my servlet.
    How can I do so that the result of the request.getParameter(...) method is exactly the string put in the text field ?
    Thank's a lot.

    Maybe my response to another thread helps...
    http://forum.java.sun.com/thread.jsp?forum=33&thread=274142
    Regards,
    Harrz

Maybe you are looking for

  • Photos will not sync to iphone5

    Just got my new iphone5 today. When I first sync'd it my photos transfered fine but now no matter what I do it will not sync photos, it always comes up with the error 'not enough memory'. Everything else syncs fine to my phone, even a 2GB game. I eve

  • Zen Vision:M 30GB won't power down; any ide

    I've had a 30GB Zen Vision M for a couple of months now! Awesome player, went through the usual round of recognition problems, but it's been working fine of late. My problem is, it won't power down now. When I try to power down, the unit says it's po

  • How do i downgrade from version 11.1.4 of iTunes to a previous version on mac?

    I recently upgraded to iTunes 11.1.4 and cannot get my head around it! Wondering if it is possible to downgrade to an earlier version of iTunes? Thanks in advance, Jackie

  • Every email in inbox opens when I enter mail

    My boss uses Apple mail. Every time he clicks on mail to enter the program, EVERY email in his inbox opens (hundreds) all over the desktop. This never happened before, and we don't know what caused the problem. Is there a setting we're missing? He si

  • How to disable some activities

    I want to disable some activities. Is that possible in BPEL? for eg: I have actitivity1, actitivity2, actitivity3 in a row. For testing, I want to disable actitivity2.