Unicode text files not recognized ?

Questions & Answers

Moderators: fgagnon, nikos, Site Mods

Post Reply
Gibus
New Member
Posts: 4
Joined: 2003 Sep 23, 12:14
Location: Toulouse, France

Unicode text files not recognized ?

Post by Gibus »

Hello,

I am using 2xEditor v 2.5.0.4 , Unicode version, on a Windows XP pro SP1a. 2xEditor works fine except for some text files that are created in unicode.

When I open these Unicode files, the Unicode text format is not recognized and the file is open as a non-unicode file (ie as an 1 byte coded ascii file).
For example, for the Unicode file containing :
Hello World

instead of opening the text corectly, 2xEditor displays the content like this :
H<00>e<00>l<00>l<00>o<00> <00><W><00>o<00>r<00>l<00>d<00>

I am a network administrator and I often use 2xEditor to open some big text files that are logs generated for diagnostics purpose by the Microsoft
to make technical support (some file are named Userenv.log, Winlogon.log, etc.. on Windows 2000, Win XP or Win 2003 server)
These OS are natively Unicode so their diagnostic files are also Unicode text files.
If I open these files with the built-in NOTEPAD.EXE, the content looks fine but with 2xEditor (or some others text editors :roll: ) I always have the bad result.

Can you tell me how to do to read these files correctly in 2xEditor ?
(without having to save them in "pure unicode" format and reopen them)

OR

Is it possible to have a new feature in the next version of 2xeditor that adds a new menu item for that ? This item will allow to switch in a "Unicode Display Mode" ( that skips one byte (the <00> ) of 2 when reading the file) like the behavior of the "HEXA" mode for example.

Thanks in avance.
Gibus
(from France)
... and BRAVO for your 2xExplorer and 2xEditor great softs :thumbup:
User avatar
nikos
Site Admin
Site Admin
Posts: 15804
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

most unicode text files have a special "mask" word (BOM) at the beginning of the file. If this is missing the file is assumed not unicode. There's no other way round it.

which program created these "unicode" files you are talking about?
Gibus
New Member
Posts: 4
Joined: 2003 Sep 23, 12:14
Location: Toulouse, France

Post by Gibus »

ok, I think you are right and that it is the reason for this behavior.

The problem is that this file are created by Windows itself , when you activate some key in the registry to "debug" some DLL.
These DLL are in the core of the operating system Windows 2000 or XP.

For example, if you look in the Microsoft Knowlegebase about the "userenv.dll" (on W2000 or WinXP), you can activate via registry some log that records everything that appends in this DLL (you can test it by reading the article Q186454 http://support.microsoft.com/?kbid=186454 or the Q221833 http://support.microsoft.com/?kbid=221833

When applying this Q221833, a file USERENV.LOG is created which is in the incorrect format ! (Yes ! Microsoft itself doesn't respect the unicode standard in this own files !! strange !)

So as we can not tell MIcrosoft to change this thing :? , what about my suggestion to create a new 'View Mode' for this type of files ?
Is it technicaly possible in 2xEditor?
I don't now if this change is a simple stuff or not.
User avatar
nikos
Site Admin
Site Admin
Posts: 15804
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

typical m$!

anyway, this is not hard to add but unfortunately i don't have any plans for changing ed2 in the near future

looks like it's back to trusty notepad for you :)
Gibus
New Member
Posts: 4
Joined: 2003 Sep 23, 12:14
Location: Toulouse, France

Post by Gibus »

ok, thanks.
Post Reply