I think é is turning into é  because trace() only outputs in UTF-8 while
the input of is probably in latin1. Which means the way the characters are
stored as binary data with differ.

I don't think you will get a bug fixed or similar trace is just a low level
function of flash player used for debugging/development. 

Maybe write your own logger? That’s what I currently do in a large project
and dependant on the target (fp/air/mobile) do different things with the
output. EG on Air create a rolling log file

-----Original Message-----
From: manitas manitas [mailto:manitas0...@gmail.com] 
Sent: 29 August 2013 12:26
To: users
Subject: Re: Pb with special characters and accents

Thank you so much Mark, it works with the escape function.

This workaround works but doesn't help me to understand the whole thing,
does it means URLVariables use a different default charset ? how to change
it ? Is it relevant create a bug report for that ?

and I still have my 2 others questions :
Why the output of trace("omé") is omé  ? Is it relevant create a bug report
for that ?
Where I can find documentation to know how to manage charset in a flex app ?

Thanks in advance for your support.



2013/8/29 Mark Line <markl...@gmail.com>

> If you don't mind the overhead you can use the escape and unescape 
> functions (build into flash player, so they are (or at least seem) to 
> be performant)
>
> -----Original Message-----
> From: manitas manitas [mailto:manitas0...@gmail.com]
> Sent: 29 August 2013 11:38
> To: users
> Subject: Re: Pb with special characters and accents
>
> Thanks for your help.
>
> The fact is that If you look at the snippet in my previous email I 
> don't think it's a transfer problem.
> The charset problem happens before the transfer so I think that even 
> if I put the data inside a XML the resulting string won't be correct.
>
> By the way I only transfer small Strings.
>
> Maybe I'm wrong but I think that the real questions are why 
> URLVariables is not able to transform my accent correctly ?
> and even without using URLVariables why the output of trace("omé") is 
> omé ?
> and more generaly how do you manage charset in a flex app ? (I didn't 
> manage to find any good documentation about this)
>
>
>
> 2013/8/29 Miguel Ferreira <miguel.cd.ferre...@hotmail.com>
>
> > 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: manitas0...@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 <aha...@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" <manitas0...@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 <aha...@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" <manitas0...@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
> > > > >>
> > > > >>
> > > >
> > > >
> >
> >
>
>

Reply via email to