On Thu, Nov 5, 2009 at 09:42, William la Forge <lafo...@gmail.com> wrote:
> I've got UTF8 working great, but it was an effort.
> Cometd was easy--it just works. Forms are a lot trickier. meta is one of
> only several places that need updating, and in fact may not even be
> helpful--we haven't seen a need for it yet.
> Now we're using jsp, so this line you will need to translate into html:
> <%@ page language="java" contentType="text/html; charset=UTF-8"
> pageEncoding="UTF-8"%>
Just as an addendum, see here:
http://bordet.blogspot.com/2007/09/jsp-page-encoding.html
> In our servlet we have this:
> req.setCharacterEncoding("UTF-8");
> resp.setCharacterEncoding("UTF-8");
> which for us was the final addition which made it all work.
> Our test data is Arabic. We are doing some impossible things with
> internationalization, (utf-8 property files)
Again for the record:
http://bordet.blogspot.com/2007/01/utf-8-handling-for-resourcebundle-and.html
Simon
--
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
On Wed, Nov 4, 2009 at 18:51, Prutkar <peter...@gmail.com> wrote:
> 2. ===============
> But, if I have user with username "Hääppöne" and he wants to subscribe/
> publish to a channel using
>
> var username = "Hääppöne"; //dynamically generated by php code -> echo
> $username; -> $username is filled from another form where user eneters
> username (all utf-8)
> dojox.cometd.subscribe("/chat/room', chat, "_chat", {
> user: username
> }
> dojox.cometd.publish("/chat/room', {
> join: true,
> user: username
> };
> I can see already in transport in FireBug some strange chars in places
> of ä and ö, my server side printout prints "H��ppďż˝ne" and write
> to the database creates "H??pp?ne"
So if I understand correctly, you generate username on server side,
you send it to the client, and then send it back via Cometd, right ?
If that's correct, then I think that the page is sent to the client
with the wrong encoding.
Even if you put in the page the meta tag with charset=utf-8, it does
not mean that the page is sent using utf-8 encoding.
I'd check that first.
> 3. ===============
> I have tried to adjust number 2 with no success liek this:
> user: encodeURI(username)
encodeURI does a different thing, it is of no use here.