floating preview wrong text preview

Things you’d like to miss in the future...
yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

floating preview wrong text preview

Post by yusef88 »

floating preview doesn't preview Arabic text correctly
no problem with preview pane. my system locale is Arabic
XYplorer: 18.20.0203

Code: Select all

System Locale ID: 3073 (ar-EG)
Thread Locale ID: 3073 (ar-EG)
Default ANSI Code Page: 1256  (ANSI - Arabic)
Active ANSI Code Page: 1256  (ANSI - Arabic)
Default OEM code page: 720   (Arabic - Transparent ASMO)
Active OEM Code Page: 720   (Arabic - Transparent ASMO)
Is DBCS Code Page: No
Image

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

1) Is that a new problem since 18.20.0203?
2) Can you send me that file, please?

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

When did the problem start exactly? I don't know. What I know it was working before properly
BTW, word files are previewed correctly
Attachments
Arabic Text.xys
(750 Bytes) Downloaded 83 times
Last edited by yusef88 on 22 Aug 2017 16:05, edited 1 time in total.

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

It was indeed a new bug added in 18.20.0203. Fix coming...

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

Thanks :tup:

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

happens again in latest beta

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

Which is the last version that works?

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

Does this setting affect floating preview? (my system locale is Arabic)
Changing format to Arabic solved the floating preview issue.
sorry for any inconvenience
Attachments
Capture.PNG
Capture.PNG (15.89 KiB) Viewed 1897 times

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

Yep, it needs to be Arabic to work as you wish.

I will add something to the next beta that will make it easier for you (and independent of that system setting!):

Code: Select all

    + Text Preview: Added tweak to remember the last selected code page across 
      previews:
        TextPreviewCodePageRemember=1
      If TextPreviewCodePageRemember=0 then the codepage will automatically 
      switch back to the system default code page for the next preview.
      Tip: You select the codepage under the orange button on the Preview tab on 
      the Info Panel (F12) while a text file is being previewed.
      If TextPreviewCodePageRemember=1 then you can, for example, set the 
      codepage to Arabic (1256) and all text previews will use this codepage to 
      interprete the bytes in the file. Advantage: You don't have to set the 
      system-wide default codepage to Arabic!

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

a very welcome change. Thank you :tup:
small note: the new tweak doesn't support Hover Box
Attachments
2018-11-14_205156.png
2018-11-14_205156.png (10.86 KiB) Viewed 1881 times

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

yusef88 wrote: 14 Nov 2018 19:55 small note: the new tweak doesn't support Hover Box
Wow! Thanks for the hint... :cup:

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

Well, runret() can return Unicode. You can run this in a directory full of Chinese files:

Code: Select all

text runret("cmd /c chcp 65001 & cmd /c dir", , 65001);
But I can't make the same trick work with UnRAR.exe (fill in <RAR archive>):

Code: Select all

text runret('cmd /c chcp 65001 & "C:\Program Files (x86)\WinRAR\UnRAR.exe" lb "<RAR archive>"', , 65001);
:?

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

if you restart XYplorer. you have to show Preview Pane first then open Floating Preview to get text previewed correctly.
problem has gone in XYplorer 19.30.0028

admin
Site Admin
Posts: 60527
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: floating preview wrong text preview

Post by admin »

yusef88 wrote: 15 Nov 2018 16:18 if you restart XYplorer. you have to show Preview Pane first then open Floating Preview to get text previewed correctly.
problem has gone in XYplorer 19.30.0028
Well, not here. :) Fix comes in 19.30.0029

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: floating preview wrong text preview

Post by yusef88 »

This feature is great but the downside it is not auto detecting other encoding formats such as UTF-8

Post Reply