Mark Atwood wrote:
In the new drizzle query log, what should I do if I encounter an event that has a database name, table name, or a query that has a non-ASCII character.

I would say for now, please use the String class and related charset to handle UTF8. You can use the String class like so:

char buff[40];
String tmp(buff, sizeof(buff), &my_charset_utf8_general_ci);
String *res;

res should now point to an allocated String instance. To get the const char * of String, do:

res->c_ptr() (along with res->length())

Hope this answers your question... not sure.

Cheers,

Jay

Should I just snprintf with %s and hope for the best?

Should I convert it to a printable ASCII string? And if so, should I convert it to a C-like backslash quoted string, or a HTML encoded string, or?

An additional complexity is that currently I'm writing to CSV formed file, so I already have to quote out commas and quote marks...





_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to