Home > Feature Discussion > Character encoding problem
login Login
  
  
Forum Software Features
Forum Software Download
Support
Top 10 List
Developers
License
Privacy






We are a small company specializing in Java applications. This forum software is the fruit of labor of many developers from Yasna Inc. and including those outside of Yasna Inc.
Although this software is maintained by developers from Yasna Inc., new feature development and enhancement requests are only done based on external requests. We maintain this project on volunteer basis and take no responsibility for its fitness of use. Please read our license agreement.
This forum software is 100% pure Java.



Links To Visit
Pick Your Own
Free Wedding Website
Farm
Classified Software
free home listing
CISSP
Wedding Flowers



 

 

Click to view all topics in this forum View Topics    Click to post a new message in this forum Post New Message    Click to reply to this message Reply    Click to search for messages in this forum Search This Forum     

There are 4 replies to this message. This thread was viewed 13337.

Author Topic: Character encoding problem
posted by: fugaz (  Davide Fugazza )
194.117.217.3
Last logged in:Wed, Jan 24 at 04:09:44 EST
Click to reply to this message
posted Tuesday, Dec 12 at 11:36 AM
Tue, Dec 12 at 11:36:13 EST
Character encoding problem
Hello,
we have a page encoding problem on our application, reproduced here:
http://www.forumsoftware.ca/viewThread.jsp?forum=5&thread=7774

post.jsp displays UTF-8 as charset encoding on Firefox.
Datas saved to DB are bad too, but when edited manually they display correctly on website.
Anyone else? Any hint?
posted by: aaflatooni(Aflatoon)
Toronto,Canada
Male
70.48.64.211
http://www.yasna.com
Last logged in:Thu, Mar 9 at 04:09:51 EST
Click to reply to this message
posted Tuesday, Dec 12 at 10:40 PM
Tue, Dec 12 at 10:40:48 EST
Character encoding problemPositive Rank
The pages have been corrected on this site, so you can verify by posting another message.

To correct it you need to ensure that your database connection properly supports unicode.

If you are using MySQL you need to specify the following connection url:

jdbc:mysql://server/yazd?autoReconnect=true&useUnicode=TRUE&characterEncoding=utf-8

Also, on top of the page post.jsp, you could change and add the line for setting character encoding:

....
boolean fck=true;
request.setCharacterEncoding("UTF-8");
....

That should solve the problem.
I will include these changes in the next beta release.

All the best
Aflatoon
posted by: fugazDavide Fugazza)
194.117.217.3
Last logged in:Wed, Jan 24 at 04:09:44 EST
Click to reply to this message
posted Wednesday, Dec 13 at 3:52 AM
Wed, Dec 13 at 03:52:45 EST
Character encoding problem
Thank you Aflatoon, it definitely works.
For the sake of global wisdom I'd say it works fine with PostgreSQL 7 too.
Best,
Davide
posted by: dorothy(dorothy)
217.133.205.226
Verified by SexStanding.com
Last logged in:Mon, Mar 19 at 01:15:43 EDT
Click to reply to this message
posted Monday, Feb 19 at 8:54 AM
Mon, Feb 19 at 08:54:30 EST
Re: Character encoding problem
Hi,
I've the same problem filling description field of a new forum; instead posting a new message all work fine.

I'm using yazd 3.0 stable release in tomcat 5.5
I've created a datasource server.xml of tomcat
<Resource name="jdbc/yazd" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
username="xxx" password="xxx" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://xxxxyyy:3306/test?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull"/>

And I'll do the same thing in yazd.properties but the prolblem persist.

thanks
D.



posted by: aaflatooni(Aflatoon)
Toronto,Canada
Male
70.48.64.211
http://www.yasna.com
Last logged in:Thu, Mar 9 at 04:09:51 EST
Click to reply to this message
posted Monday, Feb 19 at 12:53 PM
Mon, Feb 19 at 12:53:56 EST
Character encoding problem
Make sure the following lines are on top of the page.

<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

I think I tested it with different encoding, but I might have missed some.

You can check your browser, when it has loaded the page to check for the encoding as well. It has to be UTF-8.
What language/character set are you trying with?
Aflatoon



Post New Message

Name
Email
subject
Your Reply
Enter the code
   

Brought to you by:
Farm Visit For Sale By Owner