Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all, saying "UTF-8 character" is weird. UTF-8 can encode any Unicode character, so the UTF-8 character set is the Unicode character set. That means you want to create file whose name contain Unicode characters, and more specifically, Unicode characters that aren't in cp1252.</p> <p>I've <a href="http://www.perlmonks.org/?node_id=912449" rel="nofollow noreferrer">answered</a> this on PerlMonks in the past. Answer copied below.</p> <hr> <p>Perl treats file names as opaque strings of bytes. That means that file names need to be encoded as per your "locale"'s encoding (ANSI code page).</p> <p>In Windows, code page <code>1252</code> is commonly used, and thus the encoding is usually <a href="http://en.wikipedia.org/wiki/Cp1252" rel="nofollow noreferrer"><code>cp1252</code></a>.* However, <code>cp1252</code> doesn't support Tamil and Hindi characters [or "☺"].</p> <p>Windows also provides a "Unicode" aka "Wide" interface, but Perl doesn't provide access to it using builtins**. You can use <a href="http://search.cpan.org/perldoc?Win32API::File" rel="nofollow noreferrer">Win32API::File</a>'s <code>CreateFileW</code>, though. IIRC, you need to still need to encode the file name yourself. If so, you'd use <code>UTF-16le</code> as the encoding.</p> <p>Aforementioned <a href="http://search.cpan.org/perldoc?Win32::Unicode" rel="nofollow noreferrer">Win32::Unicode</a> appears to handle some of the dirty work of using <a href="http://search.cpan.org/perldoc?Win32API::File" rel="nofollow noreferrer">Win32API::File</a> for you. I'd also recommend starting with that.</p> <p>&#42; &mdash; The code page is returned (as a number) by the <code>GetACP</code> system call. Prepend "<code>cp</code>" to get the encoding.</p> <p>&#42;&#42; &mdash; Perl's support for Windows sucks in some respects.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload