You should add a filter that calls request.setCharacterEncoding() and sets
the appropriate encoding before handling the request. If you query for the
data without startsWith and display it on-screen, do you see what you expect
or is it garbled?

Also, make sure you add this line after declaring the Query:

query.declareParameters("String content");

- Jason

On Sat, Sep 12, 2009 at 10:32 PM, Yasuo Higa <[email protected]> wrote:

>
> Hi all,
>
> JDO startsWith for Japanese works fine on development server,
> but it does not work on production server.
>
> The following url is my test application.
> http://2.latest.higayasuo.appspot.com/blog/
>
> Test code:
> Query query = pm.newQuery(Blog.class, "content.startsWith(:content)");
> List<Blog> blogList = (List<Blog>)
>  query.execute(request.getParameter("content"));
> request.setAttribute("blogList", blogList);
>
> Blog.java:
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Blog {
>
>    @PrimaryKey
>    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>    @Extension(vendorName = "datanucleus", key = "gae.encoded-pk",
> value = "true")
>    private String key;
>
>    @Persistent
>    private String title;
>
>    @Persistent
>    private String content;
>
>    ...
> }
>
> My jsp's encoding is UTF-8.
>
> Is there a workaround?
>
> Thanks,
>
> Yasuo Higa
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to