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

cannot read chinese db path #142

Open
ilaer opened this issue Dec 12, 2022 · 4 comments
Open

cannot read chinese db path #142

ilaer opened this issue Dec 12, 2022 · 4 comments

Comments

@ilaer
Copy link

ilaer commented Dec 12, 2022

It will return db.Ping failed:I/O error during "CreateFile (open)" operation for file "D:\病例.G_B", when is use chinese db path like D:\病例.g_b.

dbFilePath := "D:\\病例.g_b"
conn, err := sql.Open("firebirdsql", fmt.Sprintf("sysdba:masterkey@localhost:3050/%s?charset=GB2312", dbFilePath))
if err != nil {
standard.XWarning(fmt.Sprintf("sql.Open failed:%v", err))
return
}
defer conn.Close()
@nakagami
Copy link
Owner

I don't know how to fix it.
Please pull request if you know how to fix it.

@nakagami
Copy link
Owner

Fixed by #148 ? @ilaer

@ilaer
Copy link
Author

ilaer commented Feb 7, 2025

I don't know how to fix it. Please pull request if you know how to fix it.

You can copy "C:\Program Files (x86)\Firebird\Firebird_2_1\security2.fdb" to desktop,rename it to '病例.fdb'.
Then use firebirdsql package to connect "病例.fdb" and read data,and it will return error info.

I/O error during "CreateFile (open)" operation for file "C:/Users/Qiu/Desktop/病
例.fdb"                                                                         
Error while trying to open file                                                 
ϵͳ�Ҳ���ָ�����ļ���                                                               
panic: runtime error: invalid memory address or nil pointer dereference         
        panic: runtime error: invalid memory address or nil pointer dereference 
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x42d601]  

@nakagami

@nakagami
Copy link
Owner

nakagami commented Feb 7, 2025

thanks
I don't have windows.
I wonder if someone could look into it and fix it for me.

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

No branches or pull requests

2 participants