exqlite icon indicating copy to clipboard operation
exqlite copied to clipboard

Pass binary filename to sqlite3_open

Open greg-rychlewski opened this issue 1 year ago • 7 comments

Closes https://github.com/elixir-sqlite/exqlite/issues/277

This looks like it's your issue since Elixir strings at UTF-8 encoded. But I have to admit I'm not sure why it was latin-1 before. So I might be stepping on a landmine without knowing it.

greg-rychlewski avatar Feb 16 '24 03:02 greg-rychlewski

Ok I learned very quickly why it was ERL_NIF_LATIN1 before. It's because ERL_NIF-UTF8 is new. So instead of passing it as a charlist I pass it as a binary and then convert it to a proper null terminated string inside the nif.

greg-rychlewski avatar Feb 16 '24 04:02 greg-rychlewski

i'm pretty sure the failures are race conditions because they were not touched in this pr

greg-rychlewski avatar Feb 16 '24 04:02 greg-rychlewski

I guess it's not a race condition =(

greg-rychlewski avatar Feb 16 '24 16:02 greg-rychlewski

I'll take a look at this later in the evening.

warmwaffles avatar Feb 16 '24 16:02 warmwaffles

This may be an issue with how the filesystem represents utf8 characters in windows. I'm not a windows dev, but I think we'll need to dig in to wchar stuff for the filesystem. I suspect it's utf16.

warmwaffles avatar Feb 16 '24 16:02 warmwaffles

@greg-rychlewski it's been a while, can you try re-running the CI. I can't see where to kick it off on my end.

warmwaffles avatar Mar 20 '24 19:03 warmwaffles

@warmwaffles done

greg-rychlewski avatar Mar 20 '24 19:03 greg-rychlewski