There was something weird that we noted a while ago. You need to escape one
way but not unescape the other way. Or whatever it was (decode or escape?).

This confused me at first. It may be the same problem. Search on this
forum. You should find what I am talking about.



2011/12/22 oferbar <[email protected]>

> Hi Erick,
> Thanks for answering.
> What version of APE are you using and did you compile it your self?
>
> However, the problem I'm having is on the server side, not the client.
>
> The MySql database and table are in utf-8/utf-bin format.
>
> The client side code is doing escape and then the APE-JSF is doing
> encodeURIComponent.
> So on the server side Javascript I'm getting the string *double*
> encoded.
>
> To get back the original string I do this:
>
>     msg = unescape(decodeURIComponent(params.msg));
>
> and then print that to the log and write to the database.
>
> What I get is a gibberish string like this: éÜÕÝ
> and not the Hebrew text: שלום
>
> That;s why I suspect that the APE server is not fully supporting
> Unicode, and my question is still open is this is true,
> and if so how to fix that?
>
> Thanks!
>
> Ofer
>
>
> On Dec 21, 8:08 pm, Erick Romero <[email protected]> wrote:
> > In my implementation I am able to chat using unicode test such as "埃里克"
> >
> > Receiver: (client-side)
> >
> > onRawData: function(raw) {
> > this.fireEvent('onChatLog', {'w': '', 't':
> > unescape(decodeURI(raw.data.msg)), 'b': true});
> >
> > },
> >
> > onChatLog event what do is to add the text gotten into a "div"
> >
> > If you are storing into MySQL before send back the test with APE, you
> > should take a look if the table storing the text supports unicode (utf-8)
> >
> > On 12/21/2011 09:23 AM, oferbar wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > We've got a system based on Ape 1.0 for chat.
> >
> > > Now I'm trying to add some Unicode language support for Hebrew,
> > > Korean, etc.
> >
> > > However, on the server I have a JavaScript command that receives a
> > > message and saves that to a MySql database.
> > > The command get a Hebrew string like this: "%u059e%u0592", but when I
> > > execute unescape(string) I get gibberish characters instead of the
> > > Hebrew ones.
> >
> > > I suspect that APE doesn't support Unicode string.
> >
> > > Is this correct?
> >
> > > I also tried to run a build of APE server, and I didn't see that the
> > > compilation flag UNICODE was included on any compile line, which led
> > > me to believe I need to rebuild APE with Unicode support.
> >
> > > Any help on that would be appreciated!
> >
> > > Thx
> >
> > > Ofer
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to