Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Polish characters are gets changed to ? in websphere6.1 environment

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my application, for the name field I entered polish characters eg: ŁĄSŻKIĘWIĆZIUŚ and language is polish. I navigated to one tab to the other. The polish characters are getting changed to ?. Please help me to resolve the problem
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What character encoding have you given your pages?
 
kiran_kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
encoding= UTF-8
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you perstisting these values somewhere?What character encoding does that mechanism use?
 
kiran_kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am storing it into Oracle database.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And is Oracle configured to support Unicode (by default it is not).
 
kiran_kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, Oracle is configured to Unicode. The problem is in the Websphere61 environment only, in weblogic it is working fine.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only other two significant differernce would be the JVM and the data source helper class. WebSphere will be using an IBM JVM and (usually) wraps all datasource access through a helper class. However, I'm currently looking at at WebSphere/Oracle combination that is showing (what I understand to be) valid Polish characters so I'm assuming these two things are fine. If your application stack uses Unicode through out, and your HTML pages correctly set the charset in a meta tag then this should just work. The only other thing that might cause an issue is if the client you use can't support Polish - but presumably you are accessing your weblogic and webshpere apps from the same client?

Not sure what else to suggest. It sounds like somewhere in your application's string handling you are doing something unsafe, and the difference between the environments is exposing it. Do you use getBytes anywhere? Or the new String(byte[] bytes) constructor?

 
Marshal
Posts: 26750
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This article covers all the points you need to know: Character Conversions from Browser to Database
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One other thing is that WebSphere will want a JVM setting:

-Dclient.encoding.override=UTF-8

in the process definition->Java Virtual Machine tab of the admin console.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Steve Wink wrote:One other thing is that WebSphere will want a JVM setting:

-Dclient.encoding.override=UTF-8

in the process definition->Java Virtual Machine tab of the admin console.



Will this override the encoding defined by the content-type of the response? Its a bit devious if it does.
 
Steve Wink
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at this
http://www-01.ibm.com/software/globalization/j2ee/encoding.jsp

it looks like it does. And in fact it will override for all apps on that server, which is very devious, so maybe its not the best thing to use.

Back to the original question, as has been mentioned there maybe something in the application breaking it. I found searching for ByteArrayOutputStreams and similar classes found a lot of the problems.
 
kiran_kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried by setting jvm arguments.. but it is not working.

I am using jsf page.. Polish characters are displaying correctly in a label i.e. <tr:outputLabel used for that.
But the same polish characters are converting into ? in a text box i.e. ><tr:inputText

This is happening when i move from one tab to other tab. If i do refresh on the page polish characters are coming correctly.

><trh:cellFormat id="p_1096_pm_desc_gen19" >
<tr:outputLabel id="p_1097_pm_desc_gen20" styleClass="textlable" value="#{pmmsgs.values.firstname}" />
</trh:cellFormat>
<trh:cellFormat id="p_1098_pm_desc_gen21" halign="right">
<tr:inputText id="p_1099_pm_desc_gen22" maximumLength="255" shortDesc="#{(contexthelp.shortDesc == false)? nodata : pmmsgs.values.enterfirstname}" validator="#{usersGeneralBackingBean.validateFirstName}" required="true" value="#{usersGeneralBackingBean.pageDataBean.userObject.firstName}" requiredMessageDetail="#{pmmsgs.values.new_user_firstname_prompt}" label=" " disabled="#{usersDescriptionBackingBean.pageDataBean.renderModify == false || usersGeneralBackingBean.pageDataBean.canUpdateEntity == false}"/>
</trh:cellFormat>

 
Steve Wink
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kiran_kumar wrote:I tried by setting jvm arguments.. but it is not working.

I am using jsf page.. Polish characters are displaying correctly in a label i.e. <tr:outputLabel used for that.
But the same polish characters are converting into ? in a text box i.e. ><tr:inputText

This is happening when i move from one tab to other tab. If i do refresh on the page polish characters are coming correctly.

><trh:cellFormat id="p_1096_pm_desc_gen19" >
<tr:outputLabel id="p_1097_pm_desc_gen20" styleClass="textlable" value="#{pmmsgs.values.firstname}" />
</trh:cellFormat>
<trh:cellFormat id="p_1098_pm_desc_gen21" halign="right">
<tr:inputText id="p_1099_pm_desc_gen22" maximumLength="255" shortDesc="#{(contexthelp.shortDesc == false)? nodata : pmmsgs.values.enterfirstname}" validator="#{usersGeneralBackingBean.validateFirstName}" required="true" value="#{usersGeneralBackingBean.pageDataBean.userObject.firstName}" requiredMessageDetail="#{pmmsgs.values.new_user_firstname_prompt}" label=" " disabled="#{usersDescriptionBackingBean.pageDataBean.renderModify == false || usersGeneralBackingBean.pageDataBean.canUpdateEntity == false}"/>
</trh:cellFormat>



I'm afraid I don't know about JSF.

Is there any JavaScript involved? Some JavaScript method specifically target the latin characterset- there are alternative methods that support multibyte characters.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic