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.

Bug 155268

Summary: I18N - mysql code generator utf encoding problem
Product: db Reporter: sygram <sygram>
Component: SQL EditorAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker CC: kfrank
Priority: P2 Keywords: I18N
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description sygram 2008-12-11 19:40:45 UTC
Greetings to all,

thanks for the great software. Although i am a java guy, i started playing around with php today. I noticed that the
script that creates the database connection generates this line of code :

mysqli_query($conn, 'SET NAMES \'UTF-8\'');

Since i am actually using utf characters i saw that it was not fetching me the correct encoding. So after searching
around i corrected the line to :

mysqli_query($conn, 'SET NAMES \'utf8\'');

removed the dash character and now it is ok. The version of mysql that i am using is 5.0.51a-community-nt , apache 2.2,
php 5

I am not sure if it has to do with my configuration , just letting you know.

Best Regards,

Leonidas
Comment 1 Petr Pisl 2008-12-12 10:52:01 UTC
Thanks for reporting this. Reassigning to the database part. 
Comment 2 Ken Frank 2008-12-15 03:12:53 UTC
I think you are right, it should be utf8,at least according to mysql manuall section
on encodings have seen, and the lower case is ok.

thats great that it inserts this statement now, since it is an important one
for being able to use other encodings in netbeans and between netbeans php
and the database.

marking as p2 since as per criteria it relates to encoding and how data might show
or be processed in ide.

I wonder also if php module would have such need for using this statement in its functionality ?

ken.frank@sun.com
Comment 3 sygram 2008-12-26 16:18:48 UTC
Hi Ken,

thanks for your reply.

Looking forward to the quick fix.

Best wishes for the New Year.

Leonidas
Comment 4 Jiri Rechtacek 2009-05-04 13:49:01 UTC
core-main/rev/d381871ef836
Comment 5 Quality Engineering 2009-05-05 07:48:48 UTC
Integrated into 'main-golden', will be available in build *200905050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d381871ef836
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #155268: I18N -  mysql code generator utf encoding problem