Utf-8 support

245 views
Skip to first unread message

Paul Wadsworth

unread,
Apr 19, 2012, 11:08:39 PM4/19/12
to node-mysql-native
In trying to read from a Utf-8 encoded table I just get ?'s instead of
the original text.
Is this an issue or am I doing something wrong?

Thanks

Andrey Sidorov

unread,
Apr 19, 2012, 11:21:44 PM4/19/12
to node-mys...@googlegroups.com
1) are you having same results with query and execute?
2) if query works but execute not than it' probably problem fixed here https://github.com/sidorares/nodejs-mysql-native/pull/64
I hope I'll be able to integrate & test & publish this and other changes soon (you are welcome to try it)

Cheers,
Andrey

Paul Wadsworth

unread,
Apr 20, 2012, 2:37:38 AM4/20/12
to node-mysql-native
Thanks for the swift replay Andrey.

I have tried both versions and just get ?'s for the Japanese parts of
the text.
The code i am using is the following based on the example on github

<pre>
var db = require( 'mysql-native' ).createTCPClient( "10.90.0.150",
"3306" ); // localhost:3306 by default
db.auto_prepare = true;

function dump_rows( cmd ) {
cmd.addListener( 'row', function( r ) {
console.log( r );
} );
}

db.auth( "db", "user", "password");
dump_rows(db.query("SELECT * FROM info limit 1"));
dump_rows(db.execute("SELECT * FROM info limit 1"));
db.close();
</pre>

On Apr 20, 12:21 pm, Andrey Sidorov <andrey.sido...@gmail.com> wrote:
> 1) are you having same results with query and execute?
> 2) if query works but execute not than it' probably problem fixed herehttps://github.com/sidorares/nodejs-mysql-native/pull/64
> I hope I'll be able to integrate & test & publish this and other changes
> soon (you are welcome to try it)
>
> Cheers,
> Andrey
>
Reply all
Reply to author
Forward
0 new messages