Help for this page

Select Code to Download


  1. or download this
    use Encode;
    
    ...
    
    # now it contains a cp1250 string
    # (utf8 flag is off, and characters are single-byte)
    
  2. or download this
    
    open( OUT, ">:encoding(cp1250)", "output.txt" ) or die "output.txt: $!
    +\n";
    ...
    
    # the string gets converted to cp1250 before being written to the file
    # (no need to "use Encode" in this case)