"REG_MULTI_SZ" can not contain empty strings error (likely due to Chinese encoding) RRS feed

  • 問題

  • I accidentally messed up a specific registry key of mine:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\004
    I accidentally modified the "Counter" subkey value which contained Chinese characters.  Even though I copied all the values to a text file "MyGoodPerf004_Counter_value.txt", when I paste it back in, regedit won't accept the values and gave an error meaning something like type "REG_MULTI_SZ" can not contain empty strings and they will be removed.
    I found out this is caused by the subkey value containing Chinese characters, since when I copy all English values back in it works just fine.
    I have exported the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\004 " registry key before I screwed it up, unfortunately I exported it .txt format so I can't just import it back in (due to the key being binary).
    Anyone knows how to overcome this?  How do I import value containing Chinese characters back into this key?
    BTW: This key's values are machine specific.   Also, although the key may look ok right now because I used some external registry tools to try to fix it, it's likely NOT correct as it's no longer showing up correctly in 3rd party registry editors.
    2011年1月24日 上午 10:41