filetype() fails for a UTF-8 BOM file if its extension is something like ".log" but not included in the list that I found in the topic http://www.xyplorer.com/xyfc/viewtopic. ... f+8#p56064 (i.e. txt, css, xml…).
text filetype(<curitem>); returns "Ascii" if selected file is file.log and "UTF-8 BOM" if it is renamed file.txt.
Note:
• The same behaviour can also be noticed in Info Panel - Raw view. Floating Preview and Info Panel - Preview give always the good encoding type.
• For UTF-8 BOM, an extra "." is displayed in 1st position in Floating Preview or Info Panel – Preview
• For UTF-16xx, the encoding is correctly returned, regardless of the file extension.
SC filetype fails for some file extensions
Forum rules
You might want to read this if you're looking for priority service
Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.
How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
You might want to read this if you're looking for priority service
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
-
admin
- Site Admin
- Posts: 67315
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC filetype fails for some file extensions
Confirmed and fixed.
Not sure what you mean.pirgygab wrote:• For UTF-8 BOM, an extra "." is displayed in 1st position in Floating Preview or Info Panel – Preview
FAQ | XY News RSS | XY X
-
Borut
- Posts: 1472
- Joined: 19 Oct 2010 19:29
- Location: Win10 Pro 64b 22H2, @120DPI (125%)
Re: SC filetype fails for some file extensions
I believe it is the following:admin wrote:Not sure what you mean.pirgygab wrote:• For UTF-8 BOM, an extra "." is displayed in 1st position in Floating Preview or Info Panel – Preview
To see the attached files, you need to log into the forum.
Win 10 Pro 64bit
-
admin
- Site Admin
- Posts: 67315
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC filetype fails for some file extensions
This does not happen here!Borut wrote:I believe it is the following:admin wrote:Not sure what you mean.pirgygab wrote:• For UTF-8 BOM, an extra "." is displayed in 1st position in Floating Preview or Info Panel – Preview
So this API works differently according to the locale? Shocking...
FAQ | XY News RSS | XY X
-
Borut
- Posts: 1472
- Joined: 19 Oct 2010 19:29
- Location: Win10 Pro 64b 22H2, @120DPI (125%)
Re: SC filetype fails for some file extensions
My current environment:
OS: Windows XP Professional (Service Pack 3), 32-bit (5.1)
Themes: No
System Locale ID: 3079
Thread Locale ID: 3079
Default ANSI Code Page: 1252
Active Code Page: 1252 (ANSI - Lateinisch I)
DBCS Code Page: No
You sure you are testing with an UTF-8 BOM file? We all know that BOM is superfluous with UTF-8, but still, when it is there, then dot in preview should not be seen.
OS: Windows XP Professional (Service Pack 3), 32-bit (5.1)
Themes: No
System Locale ID: 3079
Thread Locale ID: 3079
Default ANSI Code Page: 1252
Active Code Page: 1252 (ANSI - Lateinisch I)
DBCS Code Page: No
You sure you are testing with an UTF-8 BOM file? We all know that BOM is superfluous with UTF-8, but still, when it is there, then dot in preview should not be seen.
Win 10 Pro 64bit
-
admin
- Site Admin
- Posts: 67315
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC filetype fails for some file extensions
I tried something. Check next version...
FAQ | XY News RSS | XY X
-
Borut
- Posts: 1472
- Joined: 19 Oct 2010 19:29
- Location: Win10 Pro 64b 22H2, @120DPI (125%)
Re: SC filetype fails for some file extensions
Ooooops, shocking indeed! I can now confirm that v12.10.0003 indeed does NOT have this problem in, for example, the following environment:admin wrote:So this API works differently according to the locale? Shocking...
OS: Windows XP Home Edition (Service Pack 3), 32-bit (5.1)
Themes: No
System Locale ID: 1050
Thread Locale ID: 3079
Default ANSI Code Page: 1252
Active Code Page: 1250 (ANSI - Mitteleuropa)
DBCS Code Page: No
v12.10.0004 also does not have this problem in the upper environment.
Unfortunately, the new v12.10.0004 still has the problem in the following environment (as the v12.10.0003 did):
OS: Windows XP Professional (Service Pack 3), 32-bit (5.1)
Themes: No
System Locale ID: 3079
Thread Locale ID: 3079
Default ANSI Code Page: 1252
Active Code Page: 1252 (ANSI - Lateinisch I)
DBCS Code Page: No
Win 10 Pro 64bit
-
admin
- Site Admin
- Posts: 67315
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC filetype fails for some file extensions
So nothing changed between v12.10.00043 and v12.10.0004? Hm.
What are these numbers in words? Croatian?
System Locale ID: 1050
Thread Locale ID: 3079
What are these numbers in words? Croatian?
System Locale ID: 1050
Thread Locale ID: 3079
FAQ | XY News RSS | XY X
-
Borut
- Posts: 1472
- Joined: 19 Oct 2010 19:29
- Location: Win10 Pro 64b 22H2, @120DPI (125%)
Re: SC filetype fails for some file extensions
Apparently nothing changed, yes (the problematic environment was retested remotely, however, but I do not think that that makes a difference).admin wrote:So nothing changed between v12.10.00043 and v12.10.0004? Hm.
What are these numbers in words? Croatian?
System Locale ID: 1050
Thread Locale ID: 3079
I am surprised that I experience problems in the environment which appears "more normal/usual" to me.
I guess that 1050 is Croatian - I have it here selected under Regions- und Sprachoptionen / Erweitert / Sprache für Programme, die Unicode nicht unterstützen. I guess that 1050 comes from there. Directly under Regionale Einstellungen I have Deutsch (Österreich) selected.
Am not willing to change and reboot at the moment. Also am at the moment not willing to try the MS tool you have suggested in the morning.
EDIT: Here a list of the locale codes: http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx
Win 10 Pro 64bit
-
admin
- Site Admin
- Posts: 67315
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC filetype fails for some file extensions
I managed to set these locales in Win7:
System Locale ID: 1050
Thread Locale ID: 1031
Default ANSI Code Page: 1252
Active Code Page: 1250 (ANSI - Osteuropa)
DBCS Code Page: No
Result: No problems.
I did not manage to set Austria:
Thread Locale ID: 3079
But I doubt this can be the cause.
So: It remains a mystery! (I will not further investigate it)
System Locale ID: 1050
Thread Locale ID: 1031
Default ANSI Code Page: 1252
Active Code Page: 1250 (ANSI - Osteuropa)
DBCS Code Page: No
Result: No problems.
I did not manage to set Austria:
Thread Locale ID: 3079
But I doubt this can be the cause.
So: It remains a mystery! (I will not further investigate it)
FAQ | XY News RSS | XY X
XYplorer Beta Club