use Encode; use Win32::TieRegistry; # #my @allencodings = Encode->encodings(":all"); #print join("\n", @allencodings); my $val; my $val_en; print "Enter a name with French accent:\n"; $val_en = encode("utf8", ); chomp $val_en; #registry to modify (depends on program version my $reg = "HKEY_LOCAL_MACHINE/SOFTWARE/"; $val = decode("utf8",$val_en); #sets the delimiter to / for the registry reading and writing $Registry->Delimiter("/"); $testKey = $Registry->{$reg}; #structure of the registry %hashReg = ("Applications" => {"$val" => {"1.8" =>{"Directories" => {"Config" => "test"}}}}); $testKey->StoreKey("Compagnie/", \%hashReg); print "\nDone!";