Hi 

We have a Struts/tomcat solution, the jsp files using the 8859-1
character set, on top of an Oracle db, which uses UTF-8/Unicode.
Of course, in Scandinavia, we have Scandinavian characters. The problem
is putting stuff from the html input boxes into the db, and reading
stuff from the db to the page, so that the umlaut chars work.

The bean models we use are generated from schemas with XMLBean tools.
In the action that reads stuff from the page and sends it to the db, we
try to put the encoding into the XML header, but fail:

  XmlOptions opts= new XmlOptions();
  /* we'd also like to encode '>', using the newest devel version, which
also has no effect:
    XmlOptionCharEscapeMap escapes= new XmlOptionCharEscapeMap();
    escapes.addMapping('>', XmlOptionCharEscapeMap.PREDEF_ENTITY);
    opts.setSaveSubstituteCharacters(escapes);
  */
  opts.setCharacterEncoding("ISO-8859-1");
  Note addedNote= Note.Factory.newInstance(opts);       //The bean
  addedNote.setNote(text);      //text contains umlaut characters from
the jsp

Logging the xml structure, we can't see any difference in the generated
xml whether we do setCharacterEncoding() or not.

Is our strategy right but implementation wrong, or should we do this
somehow else?

Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to