I'm not sure if you're trying to work with Windows and/or a non-Windows OS. You mention Windows in your first sentence, but your code appears to be more for Linux (based on the first line and the file paths used). The comments below would only apply to Windows.
I'm probably not going to be able to explain this fully and might not use the correct terminology. In Windows, there's an attempt to maintain backwards compatibility. As a result, the default filesystem API has some limits (such as no Unicode support and a max path length of about 260 characters). Most programs (including file explorer and the command prompt) use this API. And this is also the API used by most Perl modules.
There is a second filesystem API available that will allow for Unicode characters and a significantly larger max path length. The one Perl module that I've had success in dealing with longer path names is Win32::LongPath and it does support Unicode characters in paths.
I don't have experience using the DBI module, so I took a quick look to see if it will take a file handle instead a file path. Unless I missed it, I don't think that it does. I would suggest trying to take a look at the shortpathL function from the Win32::LongPath module. This function will attempt to return the "short path" (which I'm assuming is the path in DOS 8.3 format). You might have better luck using the "short path" of the file that has Unicode characters in its path.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.