in reply to French Accent in Windows Registry
Let's look what you do: at first you encode the string received from terminal into utf8, and then you DECODE IT BACK! So it's again in the encoding of your terminal. So there is no wonder that you can print it back to the terminal, but the Windows Registry of course misinterpretes it.
You need
$val = <STDIN>; from_to($val, $enc, "UTF-16");
where $enc is the encoding of your input data, 'cp1250', i suppose.$val = <STDIN>; from_to($val, $enc, "UTF-16");
UPDATE: Added the most likely variant according to tye's note—but it can still be wrong. You need to convert from 'dos' French codepage to 'Windows' French codepage. I inserted the values for Western European codepage.$val = <STDIN>; from_to($val, 'cp850', 'cp1252');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: French Accent in Windows Registry
by duc (Beadle) on Jul 27, 2006 at 13:56 UTC |