This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | I18N - sample project not use utf-8 encoding completely | ||
---|---|---|---|
Product: | php | Reporter: | Ken Frank <kfrank> |
Component: | Code | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | tmysik |
Priority: | P4 | Keywords: | I18N |
Version: | 6.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Ken Frank
2008-07-21 19:07:01 UTC
Reassigning to the module owner - please evaluate. Thanks. am trying to see more about this 1. have changed using mysql admin the allianec db to use utf-8 for dbase, table and columns of the passenger 2. have changed using nb sql commands to set the character set for connection, results and client to utf8 3. in php index.php code have added $query = "SET NAMES 'utf8'"; $result = mysql_query($query); but don't know how to print out the values to find out results 1. when add a new customer in the air alliance sample, using multibyte of the encoding in which the air alliance project is - the mbyte shows ok in the air alliance windows but in mysql phpadmin or using nb view data, the customer names do not show ok. 2. using nb sql commands, adding a new customer with mbyte in the name, and changing other air alliance tables so that in effect a new reservation is created, the mbyte shows ok in nb sql query, but does not in the air alliance sample. 3. is there any nb activity itself going on in these 2 cases as to communication about encoding ? is the code I added correct and at correct place ? i guess there would be other code to add about encoding for reading in from the dbase vs writing to it or is the same code in index.php ok ? is the code added about set NAMES correct syntax so that it really happens - this is what have read in many articles to do. 4. this is not about translation of the sample at all, just that it would be good that sample worked with non ascii (which also would involve changing the sql scripts that creates the tables. ken.frank@sun.com more info - have added set NAMES 'utf8' to more places in code in various files near where db connect and open calls are. code also has already the meta charset tags in the various html code sections as mentioned before, dbase itself was changed to use utf8 encoding vs existing that uses latin 1 plus hardcodes the encoding of each table ---> can this sample be changed so that users can put in other characters than ascii in it, if those characters are utf-8 ok; and since sample project itself encoding is utf-8 (for samples, they are hardcoded to be utf-8 project encoding by design), then it seems it should work. But we can state that sample is not meant to have a different project encoding or characters than utf8, since means user would need to change more code of it ? for this change, code for us to change would be: 1. modifying the sql table creation script 2. creating dbase instructions to use utf8 3. adding set NAMES 'utf8' calls to various places. since we do have many users in countries where english is not used and for something like this app, ie someone's name as part of reservation, those characters of their locale would more likely to be used. ken.frank@sun.com well, what was not mentioned in last comments was that in doing the steps mentioned, things look ok now - can input or paste multibyte and it shows ok in other parts of the app and also shows ok in nb db view data -- which is proving round trip conversion of data and on re-reading of it. ken.frank@sun.com No time to fix it in NetBeans 6.5. Reasigning back to tmysik batch reassigning No plans to work on this, sorry. |