Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use unicode for connectionstring #196

Closed
Cricle opened this issue Jun 14, 2024 · 3 comments · Fixed by #197
Closed

Can't use unicode for connectionstring #196

Cricle opened this issue Jun 14, 2024 · 3 comments · Fixed by #197

Comments

@Cricle
Copy link
Contributor

Cricle commented Jun 14, 2024

var path = Path.Combine(AppContext.BaseDirectory, "中文");
if (!Directory.Exists(path))
{
    Directory.CreateDirectory(path);
}
var connstr = new DuckDBConnectionStringBuilder();
connstr.DataSource = Path.Combine(path, "中文.db");
var db = new DuckDBConnection(connstr.ConnectionString);
db.Open();

will throw exception

DuckDB.NET.Data.DuckDBException:“DuckDBOpen failed: IO Error: Cannot open file "C:\Users\huaji\Desktop\c\npnp\bin\Debug\net8.0\����\����.db": ϵͳ�Ҳ���ָ����·����
”
@Giorgi
Copy link
Owner

Giorgi commented Jun 14, 2024

Oh, the good old Unicode issue. The fix should be done in ConnectionManager.cs, do you want to send a PR?

Cricle added a commit to Cricle/DuckDB.NET that referenced this issue Jun 14, 2024
Cricle added a commit to Cricle/DuckDB.NET that referenced this issue Jun 14, 2024
@Giorgi
Copy link
Owner

Giorgi commented Jun 23, 2024

@Cricle The fix is now live on NuGet.

@Cricle
Copy link
Contributor Author

Cricle commented Jun 23, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants