in reply to French Accent in Windows Registry

Win32::TieRegistry uses the *A APIs ("ANSI") for the Registry and so needs 8-bit characters encoded to match your locale. Win32API::Registry exposes the *W APIs ("wide") for the Registry which would allow (and require) you to use Windows "UNICODE" characters (UCS-2LE last I checked but if it became UTF-16, it likely doesn't matter for French characters).

So, likely the easiest solution is to convert your strings to the current locale's 8-bit encoding and continue to use Win32::TieRegistry.

- tye        

  • Comment on Re: French Accent in Windows Registry (A/W)

Replies are listed 'Best First'.
Re^2: French Accent in Windows Registry (A/W)
by Ieronim (Friar) on Jul 27, 2006 at 16:05 UTC
    After your answer i realized that the problem is more interesting than i thought :) I tried to add a Russian word to registry, and it appeared to be far more tricky than i expected :) I will correct my previous comment.
    *A APIs ("ANSI")
    It means that Windows, not Win32::TieRegistry decides which charset is used in the input?

         s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
      Well, Thanks for your kindness and If you do find a way to do it tell me, because I am sill looking.. I thought it would be easy :| I guess I was wrong :o BTW, I have tried from_to($val, "cp850","cp1252"), but still got "Pr,cis" instead of Précis...

        Add such a key via some std GUI registry tool and then see what Win32::TieRegistry returns for it. If you only get some 7-bit value, then try adjusting your "Regional and Language Options". I wasn't able to find very clear documentation on how the *A APIs transform values to/from Windows "UNICODE", but the implication seemed to be that the configured language determined how things are mapped. If, instead, only 7-bit characters can be used, then you'll need to use the *W calls from Win32API::Registry.

        - tye        

        I cannot give you more help :) You must determine the encoding your terminal uses and the encoding your French Windows accepts. Nobody can do it for you without sitting at your computer ;)

             s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print