Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060852]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-11-17 18:00 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (270 votes). Check out past polls.