On 2016/06/24 7:08 PM, Igor Korot wrote:

OK, so all in all.
What I gather from all your replies is that however I enter the data -
table name, table fields -
whether it will be with "ALT+num", or directly typing it on the
keyboard, and independently
on where the input is produced - US, Germany or China - querying such
database will work.
correctly around the world.

Am I understanding this right?

If yes, than going back to my original post:

struct Table
{
     std::wstring name;
     std::vector<Fields> fields;
     std::vector<FKeys> foreign_keys;
};

std::wstring_convert<std::codecvt_utf8<wchar_t> > myconv;
const unsigned char *tableName = sqlite3_column_text( stmt, 0 );
pimpl->m_tables[m_catalog].push_back( Table( myconv.from_bytes( (const
char *) tableName ), fields, foreign_keys ) );

This code compiled with MSVC 2010 as C++11 snippet will crash
on the "ALT+225" symbol inside myconv.from_bytes().
And if my understanding above is correct - it shouldn't crash.

So what can I do to fix it?

Thank you.

It's hard to tell - That structure is not valid SQL, it must go through some connector in MSVC (which I am not familiar with) and in that thing gets translated. That is where it will break too when you add esset or other weird characters, but that is not SQLite that can help you, perhaps there is a MSVC forum with people who know why the translation doesn't work? If the value gets to SQLite correctly, there will be no problems and it will be the same data anyone else in the rest of the World will see.


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to