Community
Participate
Working Groups
Build Identifier: 20110218-0911 Unicode characters like • - alt+7 - is converted to • if inserted to mysql using an HTML form submit. When BIRT retrieves the saved data from the mysql source, the bullet • will be shown as • in the reports which is incorrect. Instead of seeing • i can see •. If the • is queried using a PDO and display it to HTML, it is correct(•). But if I use BIRT Designer to retrieve the • from the mysql database, it is not displayed correctly(•). Reproducible: Always Steps to Reproduce: 1. Create a simple database and table in mysql to save a word or string 2. Create a HTML form with a textarea. Put it inside a form and submit it to PHP. 3. Enter Unicode characters like alt+7 = • , alt+8 = ◘ etc. 4. Let PHP insert the word or string into mysql using PDO. 5. View the word or string from mysql client like sqlyog or workbench. 6. Notice that the strings are converted to • for • etc 7. Retrieve the string or word using PDO in php and display it to HTML, notice that it displayed the characters properly • ◘. 8. Create a birt report in eclipse birt designer to retrieve the characters from the mysql database. 9. Notice that birt report displays the • as •. ****How to fix this so that unicode characters will be shown properly in birt reports.
The data you insert into database is not correct, the BIRT will show the result as the database shows. The html shows the correct words, I think it is just a coincidence, maybe it uses the same encoding as you use in php. The data in the database should be the same as you write in php. I think you can add code "PDO.exec("SET NAMES 'GBK'")" or "PDO.exec("SET NAMES 'utf8'")" in your php code before you execute the database operation. Just have a try and it is also related to the encoding in mysql.
update the status