ello,

Indeed this is not a dbform problem.

I solved this by converting the form input into unicode hex string (e.g.
\u5e744). I guess this can be done using the preInsert or preUpdate methods.
Upon reading from db, I convert them back to characters. I don't know how to
do this in dbform.

The string covertion routines can be found on the net. Goto google and
search for ASCII_UCodeESC_CharStream. Of course, you will need to write your
own helper class to use the methods in there.

This method worked for me. But I wasn't using dbform for that project.

Another method was to configure your dbms' character set (if supported) so
that you don't need to convert anything. The drawback is that you might not
be able to store multiple language characters in the same db (e.g. your app
supports Spanish and Chinese). Anyway, I believe the true solution is at
your dbms' vendor.

cheers
romen

----- Original Message -----
From: "Luca Fossato" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, June 23, 2002 11:58 PM
Subject: Re: [dbforms] accented characters handling


Sorry,

this is not a DbForm problem !! ;^)

Luca

Luca Fossato wrote:

> Hi,
>
> I'd like to know If there is a method to handle accented characters
> (�, �, �, etc) in DbForms (with JSP1.1 / Servlet 2.2).
>
> I played with the "org.dbforms.util.MultipartRequest" class source to
> try to retrieve and decode a request parameter value (from a multipart
> form)
> according to the the locale character-set  (using
> paramPart.getStringValue(myCharcterSet) instead of
> paramPart.getStringValue()).
> Then I tried to force the jsp content type using (example)
>
> response.setContentType("text/html; charset=ISO-8859-1")
> ... or UTF-8 ...
>
> Nope!
>
> Accented characters into DbForms varchar-mapped  fields are converted
> and stored into the underlying database (Postgresql 7.2) as '?'
> characters.
> (If I use a db client, I can store the accented characters correctly).
>
> Any clue ?
>
> Thank You,
> Luca






-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms




-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to