View uses Windows-1252 codepage instead of System codepage

May 30, 2008
80
0
Gerakas, Greece
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.
 
May 30, 2008
80
0
Gerakas, Greece
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.
 
May 30, 2008
80
0
Gerakas, Greece
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: 73
May 30, 2008
80
0
Gerakas, Greece
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
Thread starter Title Forum Replies Date
T VIEW only works from command line Support 14
vefatica VIEW ... remember the UTF-8 setting? Support 0
Alpengreis Documentation Minor issue in help file for view /E Support 1
vefatica VIEW wrap searches? Support 2
R Documentation Help Nit > bdebugger View Menu Support 0
Joe Caverly Why does TCCRT return VIEW as an internal command? Support 6
Joe Caverly Pipe into VIEW and search Support 12
vefatica VIEW ... CommandPrompt ... TC21 ... unregistered Support 6
vefatica Start VIEW with the toolbar showing? Support 5
rps How to? Piping to View /gb Support 1
vefatica VIEW ... remember no toolbar Support 0
E Fixed View command broken in version 21.0 build 22 Support 9
vefatica File Explorer ... remember view settings? Support 5
vefatica "View" settings still not remembered Support 10
vefatica TCMD ... remember View settings? Support 7
C View Print Wrap - please break at whitespace Support 3
C VIEW PRINT /Wrap doesn't work Support 0
C VIEW PRINT - Documentation corrected - Font size Support 8
C WAD VIEW print multiple files - switches fail Support 10
MickeyF TCC v16 crashes when I hit F1 to view help Support 9
R V19 - 'V' and 'View" Support 6
cgunhouse Crash on View/Folder Support 1
M View doesn't recognize Ctrl+End and Ctrl+Pos1 Support 2
vefatica Speaking of VIEW Support 18
nikbackm VIEW broken in v18 + Windows 10 Support 8
Alpengreis [Bug?] View (V) Prefs Error (TC 18.00.27 x64) Support 4
D Fixed Cut and paste in TC's file/folder view does not remove file Support 17
E View (internal command) does nothing now Support 3
vefatica VIEW and chars in 128-255 Support 4
MickeyF where to view the latest JPSoft newsletter? Support 0
Joe Caverly VIEW window in a TCC tab window problems Support 5
vefatica Fixed No text in List View! Support 4
D Folder/List view changed in v15 Support 8
D How to? V15.00.30 -(help!) - Floating view windows don't open Support 1
nikbackm Fixed v15: VIEW - encoding and CSV issues Support 9
T view command not working Support 5
S TCMD No List-View with Libraries? Support 5
M Sync folder/list view with command window? Support 2
C Fixed Starting editor from VIEW Support 9
J VIEW doesn't work again Support 16
A How to? Invoke View Clipboard from command line Support 8
S Fixed View and V do not work in new 13.04.52 x64 installation Support 11
jwblyth How to? Help will not Load in View (File Viewer)?? Support 4
M Folder View Freezing Support 10
Frank is the search-function in VIEW working? Support 2
H VIEW not "screen reader friendly: Support 7
J VIEW crash on redirected input and numbered bookmarks Support 6
D view in tab and focus follows mouse Support 10
D View Help Keyboard Support 1
rconn 13.0.18 Test build for VIEW problem Support 23

Similar threads