Help for this page

Select Code to Download


  1. or download this
    $ perl -E 'mkdir("\x{100}")'
    $ perl -MB -E 'my @d= <*>; say B::perlstring($_) for @d'
    "\304\200"
    $ perl -E 'my ($d)= <*>; open(my $f, ">", "$d/\x{101}.txt") or die "$!
    +"'
    No such file or directory at -e line 1.
    
  2. or download this
    $ python2.7
    Python 2.7.18 (default, Oct 10 2021, 22:29:32) 
    ...
    >>> l=os.listdir(u".")
    >>> l
    [u'\u0100']
    
  3. or download this
    $ perl -MB -E 'open(my $f, ">", "\x{C4}\x{80}\x{A0}.txt") or die "$!"'
    $ python2.7
    ...
    >>> l=os.listdir(u'.')
    >>> l
    ['\xc4\x80\xa0.txt', u'\u0100']
    
  4. or download this
    >>> open(l[1]+'/'+l[0], 'w')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 0
    +: ordinal not in range(128)
    
  5. or download this
    $ python3
    Python 3.11.3 (main, Jun  5 2023, 09:32:32) [GCC 13.1.1 20230429] on l
    +inux
    ...
    >>> l
    ['&#256;\udca0.txt', '&#256;']
    >>>
    
  6. or download this
    >>> open(l[1]+'/'+l[0], "w")
    <_io.TextIOWrapper name='&#256;/&#256;\udca0.txt' mode='w' encoding='U
    +TF-8'>
    ...
    say escapestr($_) for <\x{100}/*>'
    
    \xC4\x80/\xC4\x80\xA0.txt
    
  7. or download this
    use feature 'unicodefilenames';
    my ($d)= <*>;
    open(my $f, ">", "$d/\x{101}.txt") or die "$!";
    
  8. or download this
    package New;
    use v5.42;
    ...
    sub foo($fname) {
      open my $fh, "<", $fname;
    }
    
  9. or download this
    package New;
    use v5.42;
    ...
      mkdir $dir or die "$!";
      system("cp -a $fname $dir/$fname") == 0 or die "$!";
    }
    
  10. or download this
    $ python3
    Python 3.11.3 (main, Jun  5 2023, 09:32:32) [GCC 13.1.1 20230429] on l
    +inux
    ...
       say escapestr($ARGV[0])',
       "\x80"])
    80
    
  11. or download this
    package New;
    use v5.36;
    ...
      # stringify to bytes, creates file "\xC4\x80/\x80.txt"
      open my $f, '>', "$dir/\x80.txt";
    }
    
  12. or download this
    $path= path("$path/$unicode")