Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

View uses Windows-1252 codepage instead of System codepage

May
80
0
View (v.exe) seems to have Windows-1252 as hardcoded system codepage. I'm viewing some (ANSI) files that have Greek characters in them, and instead of the standard Greek (codepage 1253), I'm seeing characters from codepage 1252 (mostly vowels with diacritics).

The workaround is obvious, switch to Greek (1253) encoding, but "use system codepage" is misleading, or even wrong. "Use System codepage" should use the actual system codepage, as is demonstrated by e.g. opening the same file with Notepad. Thankfully the encoding persists between sessions, so that's not so big a deal after all.

Weirdly enough, the DOS/OEM code page uses the correct OEM codepage (737 for Greek).

Finally, there is no Codepage 437 encoding. Instead, the only Western European DOS/OEM option is the less common Codepage 850.
 
Some more information: This also happens with the standalone V (from http://www.fileviewer.com/, version 12 SR1), so this is in fact Charles Prineas' problem.
 
View (v.exe) seems to have Windows-1252 as hardcoded system codepage
Γεια σου Γιωργο.

VIEW should use the system code page.

If you right-click on ANS in the status bar and select "Character Encoding" is "Default" enabled or 1252?

If Default is enabled, can you send a sample file to v at fileviewer dot com so I can use for testing?

Finally, there is no Codepage 437 encoding
I will include it in the next release.

Thanks,
Charles.
 
If you right-click on ANS in the status bar and select "Character Encoding" is "Default" enabled or 1252?
Default is enabled. I've sent you a zip file with a very small text file that demonstrated the behavior (I've zipped it to avoid any mail mangling that could occur in the way). I've also attached it to this post - it's just 388 bytes, so I don't think it will be any problem for the forum :)

Of course, if I manually select Greek (Windows-1253) from the status bar, it displays properly (and it is even persistent), so it's not a breaking bug :)
 

Attachments

  • viewtest.zip
    388 bytes · Views: 310
Some more information (I've sent them by email, but they could help others sometime :))

I'm using Windows 7 64-bit, with English UI and Greek regional options (these are distinct settings, and should not be confused):

C:\Users\GSchizas>echo %@winapi[Kernel32.dll,GetUserDefaultUILanguage]
1033

C:\Users\GSchizas>echo %@winapi[Kernel32.dll,GetUserDefaultLCID]
1032


1032 is Greek (el-GR), 1033 is US English (en-US)

It's quite common, unfortunately, to confuse those two settings, although usually it's the other way around. For example 7-zip reads the LCID as Greek, and mistakenly assumes that I want to see menus etc. in Greek. The result is that I have a right click menu with all options in English, except the ones for 7-zip which are in Greek.

In conclusion:
  • To decide which language your menus should be in, use GetUserDefaultUILanguage
  • To decide how you will print numbers, dates, etc., or what code page your text should be in, use GetUserDefaultLCID
  • Actually, to find out the default ANSI codepage, just use GetACP, as shown below:
C:\Users\GSchizas>echo %@winapi[Kernel32.dll,GetACP]
1253
 

Similar threads

Back
Top