3 Replies Latest reply on Jun 3, 2011 2:57 AM by simplesid

    Problem with german characters in httpservice

    simplesid Level 1

      Hi,

      I am trying to send german characters in a simple httpservice call (POST method). Somehow the characters are getting garbled. Can anyone help me out please?

      e.g.

      M trying to send = Küche

      What actually is getting sent = Küche

       

      Thanks in advance.

      Sid

        • 1. Re: Problem with german characters in httpservice
          rszemetisdfdafdcvzx

          Without pasting any code, its hard to know where it is going wrong, but more than likely, it is on the PHP side.

           

          Within Flex the data shoud be in UTF-8, and when encoded into a POST should  encode the UTF-8 bytes with the appropriate encoder, and then send the string to your PHP app.

           

          I would start off by looking at your PHP side, making sure you know you are viewing that data as UTF-8 and not ISO-8859-1 bytes, as what you are seeing is a typical IS0-8859-1/UTF-8 confusion  problem. If posting the data into a database, check your columns are UTF-8 encoded etc.

           

          You might want to try posting form data out of a simple html form, using specific UTF-8 encoding to your PHP app and checking it wokrs fine with that, once you have thta fixed up and checked, then try again with the flex app.

          • 2. Re: Problem with german characters in httpservice
            simplesid Level 1

            Hi,

            Thanks for your reply.

            Actually i am not even bothered about the server side component right now.(Just FYI i am using Java and not PHP). I am using Flex builder 3 and just sending a plain request parameter to any dummy httpservice (method=POST) URL. I am monitoring the data packets sent through the Httpfox plugin in firefox and there itself i can see that the characters are garbled. Please let me know if you need more clarification.

            Sid

            • 3. Re: Problem with german characters in httpservice
              simplesid Level 1

              Hi,

              You were right. the characters were appearing garbled in the network monitor tool because they were encoded as UTF-8. Once i did the same thing in Java then everything worked fine. Thanks for this.

              Sid