Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: open sqilite path unicode (SQLITE_WIN32_HAS_WIDE means unicode)

by Anonymous Monk
on Nov 01, 2013 at 23:42 UTC ( #1060852=note: print w/ replies, xml ) Need Help??

in reply to open sqilite path unicode

I would first check without GetANSIPathName...

# To avoid unicode and long file name problems on Windows, # convert to the shortname if the file (or parent directory) exist +s. if ( $^O =~ /MSWin32/ and $real ne ':memory:' and $real ne '') { require Win32; require File::Basename; my ($file, $dir, $suffix) = File::Basename::fileparse($real); my $short = Win32::GetShortPathName($real); if ( $short && -f $short ) { # Existing files will work directly. $real = $short; } elsif ( -d $dir ) { # We are creating a new file. # Does the directory it's in at least exist? $real = join '', grep { defined } Win32::GetShortPathName( +$dir), $file, $suffix; } else { # SQLite can't do mkpath anyway. # So let it go through as it and fail. } }

Although according to unicode filenames should work


but there doesn't appear to be a test in the (perl) test suite

So maybe your version is too old, you're getting 8.3 filename interference, maybe your copy of DBD::SQLite was compiled without SQLITE_WIN32_HAS_WIDE or or something else entirely :)

These things (above) are the things I would check

I would also read read Win32::Unicode and Win32::Unicode::Native and Re: dos path accents and read Re^5: threads::shared seems to kill performance (Workaround). and beware of :memory: and Windows Alternate Data Streams

Comment on Re: open sqilite path unicode (SQLITE_WIN32_HAS_WIDE means unicode)
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060852]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2015-10-08 19:20 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (223 votes), past polls