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.
Many users are from locales where non ascii is used, and in something like wish app, with a persons name and something like a wish, its more likely those characters would be used. Thus could the tutorial have some few additions and changes so that users can use any valid utf8 character I experimented with tutorial and found when I made these changes or additions, things seem to look ok with non ascii assumptions for my experiments: 1.am running in ja locale, but the project uses default utf8 project encoding 2. characters used in browser for name and wish need to be utf8 ok, solaris/linux has utf8 locales to run in but windows does not, but maybe the characters input will be ok since in nb projects on windows, using utf8 project encoding the characters show ok What I did a. create the dbase to use utf8 dbase encoding since default for mysql is latin encoding b. added meta charset tags to html sections with utf-8 as the value c. added mysql_query("SET NANES 'utf8'"); to various php files of the tutorial, usually where dbase connection has just happened - it seemed like it was needed more than once so just did it in many files (this sets connection and result and client character sets of mysql d. now the non ascii entered in the app looks ok in the app and in nb db viewer. ===> Can you consider this for tutorial ?
Ken, Can you tell me how you did (a)? I am not exactly a MySQL guru.
Jeff, I used phpmyadmin and/or command line to query the different character set values of mysql - it has a lot of them and its sometimes not clear about what each does (see mysql manual chapter 9 on this topic). I took a brute force approach for this experiment and changed all values except the server value - this command can be used to show the values show variables LIKE 'character_set%' then changed the values that were not utf-8 to it BTW, if there is a table created with specific character set noted, then it too needs to be changed; I can't recall if this demo sql scripts did that or not. ken.frank@sun.com BTW #2, my typo below is step c, should be SET NAMES, not NANES.
Fixed according to Dean Ellis' advice. Character sets are set at the table/column level instead at the database level, since table/column settings override database settings. Fixed only on staging server version.
to be specific, I added ken's steps b and c: wherever a database connection is created, I added mysql_query("SET NAMES");, and I added the meta charset tags to html sections, at least the ones where character data will be displayed. Instead of setting the database to use utf-8, I added the following MySQL to wherever character type data table columns were created. For example, note the "name" and "password" columns below: CREATE TABLE wishers( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name CHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL UNIQUE, password CHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL )