minalgar Posted November 26, 2004 Posted November 26, 2004 I heard somebody talking about the Unicode effect if you save a .REG file as Unicode. Is there any difference whatsoever if my .REG file is saved as Unicode instead of ANSI under Windows XP?
prathapml Posted November 26, 2004 Posted November 26, 2004 Well, the registry can only hold keys and values in ANSI characters. It therefore follows logically, that any derivative of the registry should only contain those chars. And if you save your .REG in unicode text, there's a good chance that there's some unicode chars in that file (intentionally, or unintentionally) - which is avoided if you save it as normal ANSI text.
minalgar Posted November 27, 2004 Author Posted November 27, 2004 The funny thing is though that if you export at .reg file in Windows XP it will export that file as UNICODE and not ANSI... There must be a reason for that. Ergo I believe that UNICODE is the most suitable format for .REG files, at least under windows xp, and especially if you use non-western european characters.
prathapml Posted November 27, 2004 Posted November 27, 2004 But what I do know is that if you have an English version of Windows (XP/2k/98/whatever) - saving your .REG in ANSI reduces the chance of unintended formatting characters getting left behind - therefore increasing the chances of your .REG being correct.
minalgar Posted November 27, 2004 Author Posted November 27, 2004 Yes, prathapml that is true, good point. But I'm still to lazy to change my UNICODE to ANSI or the other way around... both work
Yzöwl Posted November 28, 2004 Posted November 28, 2004 Too lazy!It doesn't take a second in Registry Editor to use the drop down arrow in Save as type: to Win9x/NT4 Registration Files (*.reg), to save your exports as ANSI instead of Unicode.The only noticeable difference will be that it'll start with REGEDIT4 instead of Windows Registry Editor Version 5.00
minalgar Posted November 28, 2004 Author Posted November 28, 2004 There is another difference. For example in the Unicode REG file each character in the values of REG_EXPAND_SZ and REG_MULTI_SZ is two bytes wide. For example the letter A is 0x0041 and not 0x41. In a version 4 ANSI reg file each character is a single byte wide. Here the Letter A IS 0x41. Example:Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Sample]"String"="Superman""Binary"=hex:01,02,03,04,05,06,07,08"DWORD"=dword:00004377"Expandable String"=hex(2):25,00,55,00,53,00,45,00,52,00,00,00"Multi-String"=hex(7):48,00,65,00,6c,00,6c,00,6f,00,00,00,00REGEDIT4[HKEY_CURRENT_USER\Test]"String"="Superman""Binary"=hex:01,02,03,04,05,06,07,08"DWORD"=dword:00004377"Expandable String"=hex(2):25,55,53,45,52,00"Multi-String"=hex(7):48,65,6c,6c,6f,00
Yzöwl Posted November 28, 2004 Posted November 28, 2004 well at least it's tidier....i.eOn my next birthday i will be 0025 years oldOn my next birthday i will be 25 years old
minalgar Posted November 28, 2004 Author Posted November 28, 2004 Hehe, that's true. But.. you will be 19 or 0019 (hex values )I agree that the ANSI files are easier to read and understand.
Yzöwl Posted November 28, 2004 Posted November 28, 2004 I wish I was......or better still 'The Wife'!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now