flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Ferreira <miguel.cd.ferre...@hotmail.com>
Subject RE: Pb with special characters and accents
Date Thu, 29 Aug 2013 10:20:42 GMT
Hi, 
I don't know what data type are you transferring to your server side.In my last application
i had to use JSON and inside a XML with data about text (pages of text!).
To not loose the content i add to create a child on the XML item for the content with cdata
like this:
private function addChildCDATA(text:String):XML		{			return new XML("<![CDATA[" + text+
"]]\>");                		}
This solved my problem.
In other project i used base64 encode on the front-end and decoding on back-end.
Try this both alternatives and i hope that helps with your problem.
Miguel.

> Date: Thu, 29 Aug 2013 12:12:45 +0200
> Subject: Re: Pb with special characters and accents
> From: manitas0302@gmail.com
> To: users@flex.apache.org
> 
> Thanks for your help but the problem seems to be related to the charset
> used by the app before or during the encoding of the post vars.
> 
> The class URLVariables normally does the encoding to standard post
> variables for me so that non-asci characters are transformed that way :
> http://www.degraeve.com/reference/urlencoding.php
> 
> Here is a snippet of my problem:
>   var variables:URLVariables = new URLVariables();
>   variables.var1 = "omé";
>   trace(variables.toString);
> 
> the trace output is
>   var1=om%C3%A9
> 
> instead of
>   var1=om%E9
> 
> Any idea ?
> 
> Do you know how to force UTF-8 charset for an adobe air app ?
> 
> 
> 2013/8/29 Alex Harui <aharui@adobe.com>
> 
> > I think that is two different issues.  There is a standard for POST data
> > and you probably have to encode non-ascii characters. See encode() method.
> >
> > On 8/28/13 3:04 PM, "manitas manitas" <manitas0302@gmail.com> wrote:
> >
> > >Thanks for your answer.
> > >
> > >I have just test to put an accent directly in the trace function like this
> > > : trace("é");
> > >And there is the same encoding issue so it should not be a problem from
> > >the
> > >TextInput.
> > >
> > >You said I can't rely on the trace function but this encoding problem also
> > >appears when I directly the "é" to a remote server using the POST method
> > >of
> > >an URLRequest.
> > >
> > >I'm completely stucked, do you have any idea how to investigate further ?
> > >
> > >
> > >2013/8/28 Alex Harui <aharui@adobe.com>
> > >
> > >> trace() is a low-level Flash debugger feature.  I'm not sure you can
> > >>rely
> > >> on it regarding character sets.
> > >>
> > >> On 8/28/13 1:56 PM, "manitas manitas" <manitas0302@gmail.com> wrote:
> > >>
> > >> >Hi,
> > >> >
> > >> >I'm using the apache flex 4.10 sdk to develop an Adobe Air desktop
app
> > >>for
> > >> >Windows.
> > >> >
> > >> >I have a problem with special characters and accents.
> > >> >
> > >> >In fact all my mxml file starts with the following line :
> > >> ><?xml version="1.0" encoding="UTF-8"?>
> > >> >
> > >> >but when I try to get the text of a spark TextInput and trace it in
the
> > >> >output console or send it to a remote server there is a problem of
> > >>charset
> > >> >encoding.
> > >> >
> > >> >For example if I type "é" in the TextInput the display is ok in the
app
> > >> >but
> > >> >if I get and trace the text of this TextInput I have this : é
> > >> >
> > >> >I don't know what I'm missing and where to find the encoding
> > >>configuration
> > >> >for my app.
> > >> >
> > >> >Thanks in advance for your help.
> > >> >
> > >> >Best regards
> > >>
> > >>
> >
> >
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message