Problem when setting encoding to ISO-8859-1

Hi. Is there something I'm missing when it comes to setting
encoding? Here are the code in the mxml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
</Application>
In the html-template I'm setting:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
The code for sending data from the app:
<mx:HTTPService
id="service"
url="encoding.jsp"
method="post"
showBusyCursor="true"
result="onResult(event)"
resultFormat="xml"
contentType="application/xml"
fault="onFault(event)"
useProxy="false" />
public function send():void {
var xml:XML = <Data>{data.text}</Data>;
service.send(xml);
But still the respons jsp I have made says it receives the
data in UTF-8 format? What am I doing wrong?
Servercode:
don't work: BufferedReader reader = new BufferedReader( new
InputStreamReader( is ) );
work: BufferedReader reader = new BufferedReader( new
InputStreamReader( is, "UTF-8") );

Are there no-one who have the same problem? I've tried
everything imaginable, and still the serverside receives the data
as UTF-8.
Is it supported at all to set the encoding of the
request?

Similar Messages

  • Nerving Problem with UTF-8 and ISO-8859-1

    Hi,
    I´m looking for a solution to serve this problem for many hours now, maybe someone can help me:
    1.) We need to send our Mails with the ISO-8859-1-Charset because otherwise Windows-Users get the text in the message twice: once as plain, and after a question mark formated. So I changed the NSPreferredMailCharset in the com.apple.mail.plist to ISO-8859-1:
    defaults write com.apple.mail NSPreferredMailCharset "ISO-8859-1"
    2.) So far so good. It works until I add an attachment to a message. Adding an attachment forces the sending of the mail again as Unicode (UTF-8). I could change the encoding manual, but thats not the way we can work in our company.
    My question is: is there any way to force mail to encode as ISO-8859-1? It can´t be that we have to change the encoding for every message.
    Thanks a lot
    florian
    PS: I´m not sure if this is important: we use the osx in German.

    I was thinking that since he is from Austria & references a company, there is a very strong possibility that the character "€" (the Euro currency symbol, Unicode 20AC, UTF-8 E2 82 AC) would frequently appear in messages.
    Even if he sets a preference for ISO-8859-1 as the default with Terminal, or manually changes messages to ISO-8859-1, it would not be possible to include this symbol in such messages, since there is no "€" in ISO-8859-1.
    Similar problems would occur with other symbols sometimes used in business (for example "™"), in engineering ("Ω"), in mathematics ("∑"), or even with some general punctuation marks such as the dagger ("†").
    Other possible problems are the use of other currency symbols the Euro replaced (the franc's "₣" or the lira's "₤") or others still in use (the Israeli new sheqel's "₪ or rupee's "₨"). Ligatures in an international environment would really complicate things as well, as this Wikipedia article about the Œthel illustrates.
    Note that in none of these cases would the presence or absence of an attachment matter -- ISO-8859-1 simply isn't up to the task.
    I suspect that in some cases, if it is possible, setting the default to Windows-1252 (Windows Latin 1 in Mail's list?) would help, since it does include at least the Euro & dagger. I haven't played around with this much, but I do note that in a new message window containing "€" in the body, if I set the text encoding to Windows Latin 1, Automatic, or UTF-8, Mail doesn't complain, but if I set it to ISO Latin 1, I get an error saying the message can't be saved & an "Invalid Text Encoding" alert if I try to send it.
    As for how messages are received at the other end, Windows apps (not just Outlook) are notorious for continuing to use non-Unicode API's even after the OS itself has long since moved to Unicode as its internal standard. Some of them employ bass-ackwards fixes like deciding ISO-8859-1 declarations are supposed to be Windows-1252 ones. Worse, Windows itself sometimes seems to interpret a few Windows-1252 code positions as their ISO-8859-1 control equivalents!
    All this makes life that much more complicated for people trying to avoid problems like the above.

  • UTF-8 encoding vs ISO 8859-1 encoding

    The iTunes tech specs call for UTF-8 encoding of the XML feed file; a friend of mine uses feed generator software through his blog that uses ISO 8859 encoding. Is there a way to convert the latter to UTF-8 so that iTunes tags may be successfully added?
    When I tried editing his XML file, I got error messages when I submitted the file to RSS feed validator sites (such as http://feedvalidator.org/. Any help or knowledge is appreciated because I am not the least bit expert in this coding arena.

    You don't need to convert iso 8859-1 (us-ascii) to utf-8 unless you have nonstandard characters. Basically, ascii is a subset of utf-8 and for English it will serve you just fine. You can have iTunes tags in the xml file even if the file itself is encoded in iso 8859-1.
    The error you see at feedvalidator.org is most likely a warning.
    Hope this helps!
    - Andy Kim
    Potion Factory
    http://www.potionfactory.com

  • Encoding Characters ISO-8859-2

    You say:
    You need to set your $ORACLE_HOME environment variable point to the database of interest.
    I mean:
    We work under WinNT(SP4) with MS DevStudio 6.0. What can I do to encoding Character ?
    I put line <?xml version="1.0" encoding="ISO-8859-2"?> in the XML-Header, but the oracle-parser say ' LPX-00201 '.
    Help, I need somebody help ? Thanks Matthias

    I've found a solution. Yes, the problem was, when I've written polish characters into Excel file it encoded them as a rubbish. The problem was, I didn't set the cell encodding. So my code after I've fixed the problem looks like:
    HSSFCell cell = row.createCell((short)0);
    // And below is the line I was looking for
    cell.setEncoding(HSSFCell.ENCODING_UTF_16);
    cell.setCellValue("Some text with polish characters");
    Now it works great. Thanks anyway.

  • Default UTF-8 encode to Iso-8859-1 How to?

    Excused my English, I have a problem with JCreator 2 early access, when, in JSP page, change encode it from Utf-8 to Iso-8859-1 JCreator of default restores to Utf-8, as I can make? I cannot use Italian chars as "� "
    Thanks to who will want to help me.

    Hi,
    Please post the queries related to creator 2EA to the creator 2 EA discussion at https://feedbackprograms.sun.com/login.html
    regards

  • Flat file transformation to xml with encoding in iso-8859-1

    We have a BPEL process that picks up a flat fle (fixed length), transforms it to xml and emails it. The flat file is in iso-8859-1 (when I look at special characters like e-accent's in hex).
    The basic transformation that you get from (the wizards) of BPEL don't do the trick, the special characters are corrupted and unreadable.
    After that I changed all the encoding's (in xsd's and xsl's) from utf-8 into iso-8859-1 but doesn't help either. I also added an xsl:output section to my xsl (with "encoding="iso-8859-1") but that also fails...
    Does anyone have a clue? We're using SOA Suite 10.1.3.1.
    greetings,
    Jan

    just tried that but the problem is still there
    I suspect that the output of the file adapter (reading the flat file) is already corrupted, you should be able to tell the file adapter what encoding the input file is...

  • Website not displaying correctly. Firefox is changing the character set to Western (ISO-8859-1) automatically.

    Normally I have set Firefox (or it's set by default) to Character Set Unicode (UTF-8) and everything displays perfectly. I've never had a problem before.
    Now however, whenever I upload my own website, for some bizarre reason on that particular tab (and only that tab) the Character Set is changed over to Western (ISO-8859-1) and then there's a few characters within my site that do not display correctly, namely apostrophes and hypens.
    It definitely isn't my software (Serif WebPlus X4) because the page displays correctly in every other browser. Plus it displays correctly in Firefox if I change the Character set back to Unicode.
    PS The site is a work in progress

    That happens because the server sends a content-type (<b>text/html; charset=ISO-8859-1</b>) via the HTTP response headers and in that case that content type prevails. The page code is saved with an UTF-8 byte order mark () that you see in this case.
    *http://web-sniffer.net/?url=http%3A%2F%2Fwww.valuevisionglasses.co.uk&http=1.1&gzip=yes&type=HEAD&uak=0
    *http://httpd.apache.org/docs/current/mod/mod_mime.html#AddType

  • Problems when jpeg encoding multiple images

    Hi, im trying to write a servlet which generates multiple thumbs. However when encoding for the second time i get an error java.io.IOException: reading encoded JPEG Stream.
    I can't figure out the problem
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.awt.Image;
    import java.awt.Graphics2D;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    public class Thumbs extends HttpServlet {
      private String dbDriver = "com.mysql.jdbc.Driver";
      private String dbURL = "jdbc:mysql://localhost/shopper?";
      private String userID = "javauser";
      private String passwd = "javadude";
      private Connection dbConnection;
      //Initialize global variables
      public void init() throws ServletException {
      //Process the HTTP Get request
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try{
          String foreignNr = request.getParameterValues("p")[0];
          String maxDim = request.getParameterValues("s")[0];
          if (foreignNr != null){
            int foreignID = Integer.parseInt(foreignNr);
            int maxDimension = Integer.parseInt(maxDim);
            response.setContentType("image/jpeg");
            OutputStream out = response.getOutputStream();
            writeThumbnailPictures(out,foreignID,maxDimension);
        } catch (Exception ex){
            log(ex.getMessage());
      public void writeThumbnailPictures(OutputStream out,int foreignID,int maxDimension){
        try{
          Class.forName(dbDriver);
          dbConnection = DriverManager.getConnection(dbURL, userID, passwd);
          PreparedStatement pageStatement;
          pageStatement = dbConnection.prepareStatement(
              "select * from pictures where ForeignID = ?");
          pageStatement.setInt(1, foreignID);
          ResultSet recs = pageStatement.executeQuery();
          while (recs.next()) {
            byte[] data = recs.getBytes("Picture");
            if (data != null) {
              Image inImage = new ImageIcon(data).getImage();
              // Determine the scale.
               double scale = (double)maxDimension / (double)inImage.getHeight(null);
               if (inImage.getWidth(null) > inImage.getHeight(null)) {
                   scale = (double)maxDimension /(double)inImage.getWidth(null);
               // Determine size of new image.
               // One of them should equal maxDim.
               int scaledW = (int)(scale*inImage.getWidth(null));
               int scaledH = (int)(scale*inImage.getHeight(null));
               // Create an image buffer in
               //which to paint on.
               BufferedImage outImage = new BufferedImage(scaledW, scaledH,
                   BufferedImage.TYPE_INT_RGB);
               // Set the scale.
               AffineTransform tx = new AffineTransform();
               // If the image is smaller than
               // the desired image size,
               // don't bother scaling.
               if (scale < 1.0d) {
                   tx.scale(scale, scale);
               // Paint image.
               Graphics2D g2d = outImage.createGraphics();
               g2d.drawImage(inImage, tx, null);
               g2d.dispose();
               // JPEG-encode the image
               JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
               encoder.encode(outImage);
          out.close();
        catch(Exception ex){
          ex.printStackTrace();
      //Clean up resources
      public void destroy() {
    }

    Hi,
    I am facing same problem while generating the thumbs. Did you figure out what the problem is? if you have the solution, do post it.
    Thanks in advance
    Mo

  • Problems when setting SSL for a MQSeries Adapter

    I'm trying to enable SSL and so far these are the steps I've done:
    - I've been using the DemoIdentity.jks and DemoTrust.jks files located under <MIDDLEWARE_HOME>\wlserver_10.3\server\lib for all my certificate operations.
    - I created a PrivateKey and imported it to my DemoIdentity store, created a certificate request and when I got the response imported it back using the same alias. Something I want to highlight here is that when I created the PrivateKey I left the password field empty so it supposed inherit the keystore's.
    - I also imported the CA cert into the DemoTrust.jks
    My MQAdapter is all set and when I used it with no SSL it was working just fine so I think I have the problem isolated.
    Anyway, now when I try to connect this is what I'm getting in the logs:
    at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAConnectionMa
    nager$JCAConnectionPool.createJCAConnection(JCAConnectionManager.java:1335)
    ... 59 more
    Caused by: java.security.UnrecoverableKeyException: Cannot recover key at sun.security.provider.KeyProtector.recover(KeyProtector.java:311)
    at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:121
    at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java
    :38)
    at java.security.KeyStore.getKey(KeyStore.java:763)
    at com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyM
    anagerImpl.java:113)
    at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit
    (KeyManagerFactoryImpl.java:48)
    at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:239)
    at oracle.tip.adapter.mq.ManagedConnectionImpl.setupSSLSocketFactory(Man
    agedConnectionImpl.java:670)
    Googling this it seems like it's a problem with the keystore and private key passwords being different but I changed the private key's to match the keystore (something that I shouldn't be necessary because of the keytool's default behavior when generating the key) with no positive results.
    Anyway, any ideas would be really appreciated. I've been spinning my wheels on this issue for 3 days now.
    BTW, here's I'm using Oracle SOA11g.

    Hello MV,
    I don't need to access my console through SSL as this is not part of what I'm trying to do.This will confirm whether SSL has been enabled on your weblogic. In your case it seems that SSL has not been enabled.
    the demo keystore and truststore are regular stores and I was able to successfully import certificates into them using keytool.Demo keystores are not recommended to be used in production. Moreover DemoIdentity.jks already has a private (secret) key so importing another key may cause an issue. I don't think any application server supports multiple private keys for SSL.
    I'll go ahead anyway and create a brand new set of keystores just to rule out that's not the problem here.Please test with new custom keystores and let us know the results.
    Regards,
    Anuj

  • Problem when setting cursor position property

    I'm trying to use property nodes to set the cursor position programmatically, following an arrow keypress.  When my actual data file plotted, the position assignment doesn't work properly.  If I clear the data from the graph (right click, clear graph), then the cursor responds properly.  I've attached a zipped file with VI that demonstrates the problem.  Sorry the file is large--I had to include my data file to properly demonstrate the problem.
    Thanks for any advice that help me clear this up,
    Allan
    Solved!
    Go to Solution.
    Attachments:
    My Source Distribution.zip ‏541 KB

    bracker wrote:
    I'm trying to use property nodes to set the cursor position programmatically, following an arrow keypress.  When my actual data file plotted, the position assignment doesn't work properly.  If I clear the data from the graph (right click, clear graph), then the cursor responds properly.  I've attached a zipped file with VI that demonstrates the problem.  Sorry the file is large--I had to include my data file to properly demonstrate the problem.
    Thanks for any advice that help me clear this up,
    Allan
    Include this code in 'Initialize' state.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Problem when setting JTable cell color.

    hello,
    when I setting color for particular table cell, it sets.
    but, when I click another row (another cell) , the color of the previous cell disabled and it visible only when I click that cells row.
    how can I permanatly set the color for the rows depends on input data.
    for example,
    if a device is connected, I want to give the cell color GREEN.
    if device is not connected , i want to give the color as RED.
    thank you.

    but, when I click another row (another cell) , the color of the previous cell disabled and it visible only when I click that cells row.It appears you applied color to cell editor.
    tableObj.getComponentAt(x,y).setForeground(Color.red);
    tableObj.getComponentAt(x,y).setBackground(Color.red); or could be solved properl if you post the code

  • VISA problem when setting serial read buffer on MAC?

    Hello,
    I have the following rather strange problem with serial communication on a Macintosh:
    1. I wrote a program using the simple serial VIs provided in LabVIEW and write and receive amounts of data up to about 25000 bytes. The serial buffers are both set to 32000 bytes. If I wait long enough everything works perfect (this was just a test VI for reference)
    2. I wrote the same program using VISA calls, I initialize the port exactly the same (or so I think), set and flush both read and write buffers. Then I send the data, which seems to work, except that I have to increase the general time out of the VISA session (which is already odd as it should just be sent to the buffer). However the read oper
    ation allways fails. It seems that no matter how long I wait after the write operation the buffer only contains 63 bytes, where is the rest going (from the program described above and the reaction of the instrument I know that everything is sent!)? What I read is the echo of what is sent plus one extra byte, it seems that those 63 bytes are the first 63 that are sent, the buffer is thus not overwritten as I would expect if the buffersize was to small.
    If anyone could shed some light on this problem I would be very greatfull.
    Best regards
    Koen

    I haven't tried this yet but I had the same problem as you. This was
    pasted from an earlier response from a post I made a month ago.
    >There are 2 things to try here:
    >1) Set the serial input end mode attribute to 0. The
    >attribute/property name is either "ASRL End In" or "Serial End Mode
    >for Reads".
    >2) Use the "VISA Set I/O Buffer Size" function in the VISA Interface
    >Specific subpalette. This will let you set the receive and/or
    >transmit buffer size.
    >LabVIEW VISA Software Dude...
    Koen wrote:
    > Hello,
    >
    > I have the following rather strange problem with serial communication
    > on a Macintosh:
    >
    > 1. I wrote a program using the simple serial VIs provided in LabVIEW
    > and write and receive amounts of data up to about 25000 bytes. The
    > serial buffers are bo
    th set to 32000 bytes. If I wait long enough
    > everything works perfect (this was just a test VI for reference)
    > 2. I wrote the same program using VISA calls, I initialize the port
    > exactly the same (or so I think), set and flush both read and write
    > buffers. Then I send the data, which seems to work, except that I have
    > to increase the general time out of the VISA session (which is already
    > odd as it should just be sent to the buffer). However the read
    > operation allways fails. It seems that no matter how long I wait after
    > the write operation the buffer only contains 63 bytes, where is the
    > rest going (from the program described above and the reaction of the
    > instrument I know that everything is sent!)? What I read is the echo
    > of what is sent plus one extra byte, it seems that those 63 bytes are
    > the first 63 that are sent, the buffer is thus not overwritten as I
    > would expect if the buffersize was to small.
    >
    > If anyone could shed some light on this problem I would be
    very
    > greatfull.
    >
    > Best regards
    > Koen

  • SSL-Problems when setting up a test environment with Exchange

    Hello everyone,
    I am trying to set up a test environment with Exchange 2013 to learn how the stuff works. However, I am facing some problems due to the fact that Exchange is designed for use with SSL certificates. The main thing that makes problems is the connection with
    RPC over HTTP. I've used the MS remote connectivity analyzer to find out why it is not working and as I thought it is because of a missing SSL certificate (it seems the self signed doesn't work here). Now in order to get this working I just bought a certificate
    for "mydomain.com". Now here is the first problem: This certificate is NOT a wildcard certificate. So if I understood correctly it works for mydomain.com but it won't work for subdomain.mydomain.com. Is this correct? (First question)
    If this is correct I will probably another problem: As I said this is a learning-environment so the server is at home behind a router. This means: Only one WAN-IP. I think could get this working by forwarding everything to the Exchange Server (like mydomain.com
    goes to the WAN-IP where the router is forwarding everything like port 25 or 443 directly to the exchange Server). This way I wouldn't have any problems I think: mydomain.com has a valid SSL cert, it resolves to my WAN-IP which forwards everything to the internal
    Exchange Server. Now here is the problem: I plan to setup a SharePoint Server as well. I thought about using ARR (IIS) to make both available behind the same WAN-IP without using ports inside the url. Ideally the Exchange Server should then be available via
    "mail.mydomain.com". This will work fine with ARR but then I probably have SSL problems again? (second question)
    Do you have any ideas what I can do to solve such problems? Should I buy another certificate for mail.mydomain.com? But then I would need to buy several certificates (e.g. for autodiscover.mydomain.com to get this working as well). This can become very expensive...
    Thanks!
    Regards
    Christian

    Hi,
    For your first question, if there is a single certificate just for “mydomain.com”, it cannot work for subdomain.mydomain.com.
    Generally, antodiscover.domain.com is used to access the autodiscover service for external users. If you just need test users to access Exchange server from internal environment, it is not necessary to get a certificate for autodiscover.domain.com.
    Therefore, for your second question what I can ensure is that if all URLs that used to connect Exchange from internal and external are configured to mail.mydomain.com with all services(IIS,SMTP,POP,IMAP), there will be no certificate problems in Exchange
    side.
    Best Regards,
    Winnie Liang
    TechNet Community Support

  • Problem when setting Reason of Rejection for a sales order using IDOC

    Hi All,
          I am working on a requirement where i need to put a reason for rejection as 'Item Cancelled' for a sales order via IDOC 'IDOC_INPUT_ORDCHG' in a third party scenerio where the PR is created automatically from the sales order . When the IDOC is run in the foreground I get the information message Subsequent function  " 'Purchase requisition from sales document' not possible Item & was rejected "(Message V1579) and the IDOC results in a error when run  in the background mode because of the same information message. The message should not appear when a sales order is being processed in the background but still the message is being displayed . Is there any way the message can be suppressed ? Thanks in Advance.
    Regards,
    Sowmya.

    can you send the program how you create a so or po using IDOC, as i've a assignment creating PO using IDOC & then creating a sales order of the PO. and i dont know how to create a IDOC. SO IF you have sample program it would be help full
    Thanxs

  • Audio Problems when setting default device

    Everytime I try to set my headphones as the default sound device, my computer won't allow me to. I even tried to troubleshoot it, and it came up with the resolution of setting my headphones as the default device, but it failed to due to an error.
    It only occurs whenever I use the program Mumble, as I am a gamer and I use it to communicate with my fellow gamers. So whenever I fire up the program, all other sound except what comes from it, goes to my speakers. I don't know if this has to do with the program Mumble itself, or the fact that I LITERALLY cannot change my default device. Please help?

    What version of Windows are you using? 
    Also, could you please give me the exact model number of your notebook?
    You can use the following document if you need assistance in finding it.
    http://h10025.www1.hp.com/ewfrf/wc/document?tmp_renderType=findModel&cc=us&dlc=en&docname=c00033108&...
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

Maybe you are looking for