My dbforms-config.xml looks like:
<dbconnection
id = "as400"
isPow2 = "true"
default = "true"
connectionProviderClass =
"org.dbforms.conprovider.JakartaConnectionProvider"
name
= "jdbc:as400://systemName;characterEncoding=windows-1257"
isJndi = "false"
conClass
= "com.ibm.as400.access.AS400JDBCDriver"
username = "username"
password = "password"
>
<property name="useUnicode" value="false" />
<property name="characterEncoding" value="Cp1257" />
<property name="charSet" value="Cp1257" />
</dbconnection>
Here I used jt400.jar as a jdbc driver for AS400
And I've included filter into web.xml:
<filter>
<filter-name>EncodingFilter</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>WINDOWS-1257</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>EncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Also changes in web.xml to make it accept filter:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
The last thing is using <%@ page contentType="text/html;
charset=windows-1257" %> in each jsp page
Ruben
Hi Ruben,
Please could you post your database connection again? So Shawn could add
it to the manual: How to support foreign languages with AS400?
Thanks
Henner
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im
> Auftrag von [EMAIL PROTECTED]
> Gesendet: Dienstag, 25. Februar 2003 08:09
> An: Shawn
> Cc: dbf
> Betreff: Re: [dbforms] Support of Latvian language
>
>
>
> Hi,
>
> It's a miracle! Something from your suggestions was helpful!
> Now the aplication works with latvian symbols, as if there
> were no problems before... I don't know what exactly helped
> to solve a problem. At this time application uses filter,
> uses jdbc properties and in jsp pages there is a string <%@
> page contentType="text/html; charset=windows-1257" %>. All of
> these methods helped to solve a problem. Thanks, Shawn!!!
>
> Ruben
> ___________
>
>
>
>
> I hate it when my suggestions don't help.
>
> Next, let's try this from ch17 Connection Support of the manual.
>
> <dbconnection id = "jakarta-commons-dbcp" isJndi = "false"
> isPow2 = "true" 89 default = "false" connectionProviderClass
> = "org.dbforms.conprovider.JakartaConnectionProvider"
> connectionPoolURL = "" conClass = "org.postgresql.Driver"
> name = "jdbc:postgresql://localhost/myDatabase" username =
> "postgres" password = "">
>
> <!-- jdbc properties --> <property name="charSet" value="ISO-8859-1"
> /> </dbconnection>
>
> This example was taken from the Jakarta Connections Pool but
> I know Sybase users have to pass in properties to thier drive
> this way and not in the name property. Maybe your driver is the same.
>
> Shawn
>
> On Mon, 2003-02-24 at 21:35, [EMAIL PROTECTED] wrote:
> > I have tried these two methods.
> >
> > 1) Filter changed nothing: "?" are still displaying in
> input elements.
> > Non-english symbols are replaced with "?". If I don't use
> text input
> > elements, text is showing correctly. Even button labels can
> be written
> > in Latvian. And table fields are with Latvian symbols, if I display
> > them
> with
> > help of construction:
> > <td><%= currentRow_TableName.get("FieldName") %></td>
> >
> > 2)I'm using jt400.jar driver, than connects to AS/400 server. This
> > driver do not support Unicode. And adding characterEncoding to line
> > "jdbc:as400://lkb01;characterEncoding=windows-1257" doesn't change
> > anything. Maybe somebody know how to set as400 driver to work
> > correctly. I'm not sure that problem is in driver. As it reads
> > information correctly when text input controls are not beeing used.
> > Now I'm going to write pure jsp page which will get data with this
> driver,
> > without DbForms. This will be the way to check wether problem is in
> DbForms
> > or in driver.
> >
> > Of course, if you have any suggestions, please, write them
> to me! If
> > anyone have used DbForms with AS/400, please help to set up driver!
> > Please write, if you had similar problem!
> >
> > Shawn, could you write about other ways to set drivers charset!
> >
> > With hope to solve a problem,
> > Ruben
> >
> >
> >
> > Hi,
> >
> > I don't know why but using charset=**** never worked for me.
> >
> > Two things helped me though:
> >
> > 1) using the
> >
> Jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/Se
> tCharacterEncodingFilter.java
>
> >
> > by setting in in web.xml and moving to WEB_INF/classes of my webapp
> >
> > and 2) making sure my driver was set properly
> >
> > <!dbconnection
> > name =
> >
> "jdbc:mysql://localhost/test?useUnicode=true&characterEnco
> ding=Shift_JIS"
>
> >
> >
> > Obviously I am using a diff charset than you but....
> >
> > There are otherways to set your drivers charset if this
> doesn't work
> > for your db :)
> >
> > There are lots of people on this list using diff charsets
> so I think
> > you shouldn't have an unresolable problem. :)
> > > Hi,
> > >
> > > I'm using DbForms in Latvia. And I have problem with Latvian
> > > language support in dbforms. Can anyone help with this
> problem??? I
> > > use string <%@ page contentType="text/html;
> charset=windows-1257" %>
> in
> > > the beginning of jsp. This string should set encoding to
> Latvian. In
> the
> > > reality this string works only in cases when I don't use form
> > > elements, such as <db:textField>. But when I use <db:textField>,
> > > latvian symbols
> in
> > > this field are replaced with "?". Please, help me!
> > >
> > > Thanx in advance,
> > > Ruben
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SlickEdit Inc. Develop
> an edge.
> > > The most comprehensive and flexible code editor you can use. Code
> > > faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
> > > www.slickedit.com/sourceforge
> > > _______________________________________________
> > > DbForms Mailing List
> > >
> > > http://www.wap-force.net/dbforms
> > --
> > Shawn <[EMAIL PROTECTED]>
> >
> >
> --
> Shawn <[EMAIL PROTECTED]>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> DbForms Mailing List
>
http://www.wap-force.net/dbforms
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms