tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Тимур Кулибаев <>
Subject Re: Oracle Application Server 10g R3 works fine with RK-1048 codepage but Tomcat 7.0.47 does not.
Date Mon, 20 Jan 2014 13:41:09 GMT
Hello, experts !  Thank to all those professionals who corresponds with me
for my trouble with Oracle UIX servlet on Tomcat.
Chris,  for your question:
>>>Did you try setting the encoding to "UTF-8" instead of "system" ?
Yes, but Kazakh letters are still incorrect. Regardless of what codepage I
put in AddDefaultCharset filter (UTF-8, Cp1251, CP1251) actual coding of
user data is always in UTF-8 - I restored text by decoding letter codes
from html-code (by view html-code of page) using

Also as Konstantin adviced ieHTTPheaders output was created (for Tomcat
with JAVA_OPTS="-Duser.language=ru
-Dfile.encoding=cp1251") - please see uploaded one.
I see from ieHTTPheader output that content-Type=Windows-1251 which is
I created one more ieHTTPheader output for Oracle Application Server which
works fine with Kazakh letters - see uploaded one also.

you have many questions. Can you speak to me through Skype ? You can do
remote session with me using TeamViewer  (to arrange with me use skype:
timur.kulibaev) to see Tomcat and Oracle AS by your own eyes.
Yes, database is in cyrillic CL8MSWIN1251 and there is a PL/SQL package
which substitutes kazakh letters by some codes. Also, there is a filter
named useKZSymbols in servlet which filters in/out data-stream.

>>2. When the "trick" that inserts Kazakh characters into positions of
Cyrillic characters happens ?
I don't know exactly - I think at filter useKZsymbols.

>>Do you serve your page with content-type encoding of "windows-1251",  but
clients read and process it as if it were "RK-1048"?
In Oracle AS ieHTTPheader output I do not see any encoding set at all -
check yourself; client browser works always in Windows Cyrillic.

>>What is the value of "Content-Type" HTTP header in HTTP response
generated by the old and new servers ?
In old server: Content-Type: text/html
In new server: Content-Type: text/html;charset=windows-1251

>>What web browser are you using ?   Internet Explorer 6, 7, 8

See attached files with customer details form screenshot and ieHTTPheaders
output for Tomcat and Oracle AS.
What is the list of possible values of "encoding" tag for
AddCharsetEncodingFilter ?  May be i'm wrong with name of code page ?
Waiting for your answer,
thank you, Timur

2014/1/19 Christopher Schultz <>

> Hash: SHA256
> Тимур,
> On 1/17/14, 10:52 AM, Тимур Кулибаев wrote:
> > Hello, Chris ! Thank you for your correspondence with me.
> >
> > I misleaded you a lot in the following part:
> >
> > +++For Tomcat 7: lang="ru-RU", content="Oracle UIX",
> > +++charset="UTF-8" type="text/css"
> >
> > Actually, charset="UTF-8" is applied only to link element: <link
> > rel="stylesheet" charset="UTF-8" type="text/css">
> >
> > Servlet source code does not define contentType. Oracle UIX- based
> > servlet generates UIX-objects (*.uix)  dynamically at user calls.
> > UIX-objects are html-pages in fact and their header has no
> > contentType element. It means that Tomcat must itself decide which
> > code page is to be assigned to generated UIX-objects. It's the root
> > of the trouble. I tried to use the following options to force
> > Tomcat works in windows-1251:
> >
> > $ echo $JAVA_OPTS -XX:MaxPermSize=128M -Xms256m -Xmx1024m
> > -Duser.language=ru -Dfile.encoding=Cp1251
> > <--also CP1251, windows-1251, Windows-1251
> >
> > but no effect. Also, I added filter: <filter>
> > <filter-name>AddDefaultCharsetFilter</filter-name>
> >
> >
> <filter-class>org.apache.catalina.filters.AddDefaultCharsetFilter</filter-class>
> >
> >
> <init-param>
> > <param-name>encoding</param-name>
> > <param-value>system</param-value> </init-param> </filter>
> >
> > <filter-mapping>
> > <filter-name>AddDefaultCharsetFilter</filter-name>
> > <url-pattern>*.uix</url-pattern> </filter-mapping>
> Did you try setting the encoding to "UTF-8" instead of "system"? If
> you use "system", do you get any encoding specifically set in your
> Content-Type headers?
> Can you dump the headers from a request and post both the complete
> request and complete response headers? Also mention which
> configuration you are using at the time.
> > Developers who created UIX-servlet left our company. I'm not Java
> > programmer. Is there any way to force Tomcat 7 implement
> > dynamically generated UIX-objects by single-byte contentType ?  Now
> > actual contentType is Unicode.
> I think you're just going to want to use UTF-8 for the server-browser
> communication. Using the single-byte stuff with your database should
> be just fine, but don't subject anyone else to that stuff.
> The AddDefaultCharsetFilter *should* do the job, but you'll have to
> configure it correctly -- plus it's only a default. If some other code
> explicitly sets the content-type or character-encoding, then the
> Filter will do nothing.
> > In your previous letter you put a number of questions, so to make
> > my message as short as possible I answer to all your questions in
> > attached file. Please see one also.
> This list strips attachments. It's no trouble to look through a long post.
> - -chris
> Version: GnuPG v1
> Comment: GPGTools -
> Comment: Using GnuPG with Thunderbird -
> MryClW7fol7MrgRE6GWzf8vCLPSgqL16zXx9aVCdGcfqiYuOjAOMJZzElkUxj2HZ
> 9mhQJ60OgWk99JHHc9XT7HoFQa82F0ROpsvtKcQ5GEO7zeAU2ttvaHAQJ4QjWzZE
> f8KLHZKzcaTy28bINtGRyWIigzZBnMnd4LWEsjmgu39DksZAWz21TBtX0jJrawBV
> DVwohh9q3ayZatKV9TKR6WJ9Ee9JGM+LzzYFingnBj82Ca763HeanEJbYS1Q4Mv7
> SebI0pnY0pKRqJFk9he8PMJZgOa5tvT1J6hR+OGKAQXNfiR7RUaMsmPtQdokN65U
> Q8C57AV77bVLCEYeU7ml5f7KMjkWedBCMigiL648L0RCNAiAaXpLNN0mRd9YLMUv
> mEhM5eV28pvLwnrLpmYQKo/JeOy8+7YxCoxYJulUmxINrE9K1DZ3VO3Sc15ALlAx
> TIfChU3/5LX5rXEL4QCvaVNl08lV3MhEe0gi6636cDgsLA3HHBNFeIWIgp0fiPbm
> vh7VY1OhOYwXizL4uxudhetaUIwhjmMGz+shRiq1VZeX7DooT6NzeRpWMDz+hVwa
> y5PzIQUJYvL7DlA6BHdm
> =xUvf
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message