Page 1 of 2

floating preview wrong text preview

Posted: 21 Aug 2017 16:44
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

Re: floating preview wrong text preview

Posted: 21 Aug 2017 18:43
by admin
1) Is that a new problem since 18.20.0203?
2) Can you send me that file, please?

Re: floating preview wrong text preview

Posted: 21 Aug 2017 23:10
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

Re: floating preview wrong text preview

Posted: 22 Aug 2017 14:26
by admin
It was indeed a new bug added in 18.20.0203. Fix coming...

Re: floating preview wrong text preview

Posted: 22 Aug 2017 14:42
by yusef88
Thanks :tup:

Re: floating preview wrong text preview

Posted: 13 Nov 2018 18:50
by yusef88
happens again in latest beta

Re: floating preview wrong text preview

Posted: 14 Nov 2018 15:35
by admin
Which is the last version that works?

Re: floating preview wrong text preview

Posted: 14 Nov 2018 17:13
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

Re: floating preview wrong text preview

Posted: 14 Nov 2018 18:23
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!

Re: floating preview wrong text preview

Posted: 14 Nov 2018 19:55
by yusef88
a very welcome change. Thank you :tup:
small note: the new tweak doesn't support Hover Box

Re: floating preview wrong text preview

Posted: 14 Nov 2018 20:26
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:

Re: floating preview wrong text preview

Posted: 14 Nov 2018 20:51
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);
:?

Re: floating preview wrong text preview

Posted: 15 Nov 2018 16:18
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

Re: floating preview wrong text preview

Posted: 15 Nov 2018 19:03
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

Re: floating preview wrong text preview

Posted: 28 Nov 2018 17:21
by yusef88
This feature is great but the downside it is not auto detecting other encoding formats such as UTF-8