praeclarum/sqlite-net — pull request #71 by timheuer (2012-07-03 20:29:01+00:00)
Title: Unicode chars in path fail using Open

This change attempts to resolve issues with Unicode chars in the path when apps are just using SQLiteConnection(path, flags) ctor. When a path includes Unicode chars this method fails because it should have been using open16 instead of open_v2. This change alters the SQLiteConnection(path, flags) ctor only to always use open_v2 even if Unicode chars are present. This will always open the db in UTF-8. Because of this Open16 is also added to the DllImport in the event someone wants to use this, they can create a new SQLiteConnection and modify it.

Additionally this corrects the input string marshaling using the MarshalAs attributes.

This should be tested on all platforms to ensure the change to SQLiteConnection(path,flags) has no negative effect.