How common is this sorting order in scopes and Linux?  - Page 1
Forum section: electronics / testgear

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 06:47:07 am
content: My scope sorts the filenames rather unconventional IMHO. (See attachment)How about yours?Windows and Ubuntu 18.04 sort like i think it should be sorted (ignoring the letter case).

author: Whales
author_rank: Super Contributor
timestamp: February 15, 2025, 06:54:48 am
content: It depends. The fancier file managers on Linux do it the human/pretty (A<a<B<b<...) way but most console tools do it the byte value (all capital letters < all lowercase letters). Then you get into sorting of unicode characters which is often very different between languages, standard libraries, locales and operating systems.Years back I was fixing a software bug to do with the order some files were loaded in. These files had numbers at the end, like file_1, file_2, and file_10. The code used a Windows function that did "natural sorting" to sort the files first. It worked great on Windows machines, but on Wine (Linux) this function was a stub that sorted things slightly differently. Then we discovered that this function might change its sorting depending on OS locale on Windows too

author: tautech
author_rank: Super Contributor
timestamp: February 15, 2025, 07:00:55 am
content: Discussed at length in another thread:Quote from: 2N3055 on February 10, 2025, 07:25:28 pmSome chose to ignore this.....

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 07:42:28 am
content: Quote from: Whales on February 15, 2025, 06:54:48 amI believe, that this scope has also a bug there, but it could be, that i was just confused there, because the file starting with "V...", could not be seen. It was in the "other" abc (the one with the upper-case).I also have some little knowledge with ubuntu 18.04, but i did not encounter such an issue there.

author: mwb1100
author_rank: Frequent Contributor
timestamp: February 15, 2025, 08:53:24 am
content: The default order of a file listing on Linux depends on the system's locale setting which defines the sorting order of characters for the locale's language setting.If I create the set of files given in the screenshot and ask for a file listing on my linux system, the files are listed in a different order than the screenshot because my system is set to the "en_US.UTF-8" locale:Code:~/test$ touch A_1.png B.png B_1.png C_1.png a.png b.png c.png~/test$ ls -1A_1.pnga.pngB_1.pngb.pngB.pngC_1.pngc.png~/test$ locale | grep LANG=LANG=en_US.UTF-8If a linux system is not configured otherwise, it will use the "C" locale (the C programming language's 'locale') and the files are listed in the same order as in the screenshot:Code:~/test$ unset LANG~/test$ ls -1A_1.pngB.pngB_1.pngC_1.pnga.pngb.pngc.pngThe order of the file listing in the screenshot is not a bug - it's simply that the system is using the default "C" programming language locale. This is very common for devices which are not general purpose computers.

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 09:16:33 am
content: Quote from: mwb1100 on February 15, 2025, 08:53:24 amWell then i consider this as beeing common, or "conventional". In contrast to what other people say here in the forum.Quote from: mwb1100 on February 15, 2025, 08:53:24 amYeah, i know. With the word "because", i tried to refer that i was "confused", and not to that it was a "bug". (see the sentence again - did i write this wrong?)BUT, essentially everything, that the scope does, it does so, because it is programmed that way. A bug is a behaviour, that was not intented to be, doesnt it? (Except bugs as "out of bounds" of course).

author: mwb1100
author_rank: Frequent Contributor
timestamp: February 15, 2025, 09:17:17 am
content: I should also note that the sort order for natural languages is generally much more complicated than one might guess. This is a reason why providing for locale configurations beyond the default "C" locale might not be provided.- A simplistic explanation of locale based sorting:https://unix.stackexchange.com/questions/252419/unexpected-sort-order-in-en-us-utf-8-locale- the full Unicode sorting algorithm (70+ pages!):http://unicode.org/reports/tr10/

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 09:19:37 am
content: Quote from: mwb1100 on February 15, 2025, 08:53:24 amIs there another locale that uses this sort scheme? Or is there a reason to use this sort scheme where the user interacts with it?

author: mwb1100
author_rank: Frequent Contributor
timestamp: February 15, 2025, 09:34:22 am
content: Quote from: eTobey on February 15, 2025, 09:16:33 amI'd say it's common or conventional on a general purpose computer system. I think the simplistic "C" locale sorting is certainly common (maybe even conventional) on embedded or single purpose devices.Quote from: eTobey on February 15, 2025, 09:16:33 amI'm not sure what you're trying to say here. But I wouldn't consider the oscilloscope's behavior as a bug, even if I might find it mildly irritating and prefer that it sort according to the "en_US" locale. Generally on embedded devices I'll use a naming convention if I want to get a particular file sort - something like starting a filename with an increasing 3 digit number (001-foo.png, 002-foo.png, etc) or start it with date/time in a sortable format: 2025-02-13.13.05.foo.png, etc. Actually, I often do this on my desktop system because it keeps things tidy.Of course to be able to use sortable date/time stamps the file system needs to support long filenames, which is another thing that embedded devices might not have (I have no idea whether or not Siglent oscilloscopes do).

author: mwb1100
author_rank: Frequent Contributor
timestamp: February 15, 2025, 09:52:55 am
content: Quote from: eTobey on February 15, 2025, 09:19:37 amI don't know if there's another locale that sorts similarly - my knowledge of locales doesn't extend much beyond that the "C" locale sorts strictly (or more or less) according to ASCII values and that other locales sort differently. And that there are differences in how dates, numeric values, and monetary values are presented. I'm sure there are a lot of other things too.I think there are 2 primary reasons that devices use the "C" locale:1) it's simple2) if that's the only locale you support then you don't have to add some configuration option to set the localeNote that setting the UI language is different than setting a locale (though obviously related in a general sense), as is having a setting for how dates should be displayed.

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 10:43:57 am
content: Quote from: mwb1100 on February 15, 2025, 09:34:22 amYour are at least on step ahead of Siglent! They dont know the implications of leading zeros:Quote from: eTobey on February 09, 2025, 07:18:03 amSadly seemingly you and me are one of the very few, that like things tidy. Others say its all good, it works as it should.

author: nctnico
author_rank: Super Contributor
timestamp: February 15, 2025, 12:48:12 pm
content: Quote from: eTobey on February 15, 2025, 06:47:07 amIt looks like somebody forgot to configure the OS's sorting order. Having capitals first and then lowercase is some kind of old style sorting order dating from the days code had to be compact. But it is far from user friendly because you basically end up with two consecutive alphabetically sorted lists. Nowadays there really is no reason to sort alphabetically in a logical (user friendly) way.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 15, 2025, 01:16:36 pm
content: Quote from: nctnico on February 15, 2025, 12:48:12 pmThat's not the conclusion in the previous replies. It's probably not implemented, therefore it defaults to the C locale, which has this behavior. Usually the C locale is "good enough" in an embedded device. If you add other locales, e.g. en_US.UTF-8, you need a mechanism to set the locale, and you would also have to ensure that the appropriate software components work when you change the locale. In pretty much every desktop Linux system, locales are implemented through the glibc library. An embedded system may or may not use glibc.

author: nctnico
author_rank: Super Contributor
timestamp: February 15, 2025, 01:52:56 pm
content: I would be highly surprised if modern day embedded Linux systems don't use glibc. Storage is cheap and not using glibc has some serious drawbacks where it comes to compatibility with other software. Been there, done that. I have not used anything else than glibc in embedded Linux for more than 15 years. So it is reasonable to assume it is a configuration issue and not lack of support.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 15, 2025, 02:17:42 pm
content: Quote from: nctnico on February 15, 2025, 01:52:56 pmI still wouldn't call it configuration issue, because you need some kind of interface to configure it. When you install a Linux distribution, there is a screen in the setup where you can select language, locale and keyboard. For sure it's possible to implement. But then you also have to test your GUI applications, so that all locales that you support, don't break or cause bugs in the interface.

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 02:40:40 pm
content: Quote from: JohanH on February 15, 2025, 02:17:42 pmI can configure a few things (see attachments).If the locale is not configured at all, because it may not be of importance, then this should be easy to fix (by siglent)? Just configure it, so it would sort the right way.

author: nctnico
author_rank: Super Contributor
timestamp: February 15, 2025, 02:41:21 pm
content: Quote from: JohanH on February 15, 2025, 02:17:42 pmThe GUI doesn't need to allow setting a locale. The locale can be set to a fixed configuration when the OS image is build. From there it will always be the same. The Linux OS images I create have en_US.UTF-8 by default and will sort files alphabetically regardless of case. Unless requested, I don't configure support for any other locales.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 15, 2025, 02:49:15 pm
content: Quote from: nctnico on February 15, 2025, 02:41:21 pmPossibly. But English isn't the only language. If you hard code it to en_US.UTF-8, you might cause issues for other languages. I don't know, because it's not my product, I just say it looks like it's not implemented and when we are talking about a commercial product, that's a decision for them to take based on user input, R&D budget etc. User feedback can play a role to improve the product.

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 02:52:12 pm
content: Quote from: JohanH on February 15, 2025, 02:49:15 pmYou can set up the language in that scope, so that should not be an issue?

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 03:07:00 pm
content: You know what i find really funny about this? On the screen keyboard, there are only special characters in the secondary "keyboard page". So for a whitespace you have to do 3 clicks. Yet, there is this "caps" key, that - with this issue - to me is a rather "unpleasent" key, as a simple mistake would result in a file "dissapearing" (into the other abc), or the wrong file beeing used, if there are the same filenames with different cases (in windows). So what i will keep on doing here is, naming my files like this: "firsttestwith1kresistor.csv". A keyboard is not an option for me.

author: nctnico
author_rank: Super Contributor
timestamp: February 15, 2025, 03:12:45 pm
content: Quote from: JohanH on February 15, 2025, 02:49:15 pmThere is no hard coding. Just setting a more sensible default. It is difficult to tell what Siglent did but I have created multi-language products in the past and Linux has some pretty nifty ways to make it easy for software developers to add support for multiple languages. It doesn't take recompiling the software to change the texts; update the file with translations, restart the program and done.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 15, 2025, 03:45:04 pm
content: Quote from: nctnico on February 15, 2025, 03:12:45 pmYes, I think we are nitpicking now. My whole point was that it needs some changes by the product vendor, even if you nowadays can take ready made pieces of open source software and just "configure" them, there can be a lot more to it and as every change or feature addition to a product, you have the whole R&D process and testing activities involved. And even if you insist that en_US.UTF-8 would be a good default, did you already test with the interface changed to e.g. Chinese? If you are a small vendor, it might be fast and easy. If you are large, it's a process that costs money (I work in a big company R&D). I think all has been said, I have no further input.

author: 44kgk1lkf6u
author_rank: Regular Contributor
timestamp: February 15, 2025, 04:12:05 pm
content: Quote from: mwb1100 on February 15, 2025, 09:52:55 amSorting Latin letters case insensitively is a thing unique to languages that use Latin letters. For example, ja_JP sorts upper case Latin letters before lower case. ru_RU sorts lower case before upper case. Instead of figuring out how to make speakers of all languages happy, it is sensible for the programmer to choose the C locale and spend time on more important things like making sure that the SCPI parser works right regardless of how many spaces follow a comma. Trying to code case insensitive sorting for all languages leads to complicated problems like how to misassume whether an Englishman or Turk wrote Iiİı.By the way, it is LC_COLLATE instead of LANG that determines how things are sorted.You people have luxurious problems. My oscilloscope does not suffer from this problem because it uses 8.3 filenames. It does know to pad numbers with 0's though.

author: eTobey
author_rank: Super Contributor
timestamp: February 15, 2025, 06:04:48 pm
content: Quote from: 44kgk1lkf6u on February 15, 2025, 04:12:05 pmI see no real need to "figure something out", just set the sorting order for the language that is set.Quote from: 44kgk1lkf6u on February 15, 2025, 04:12:05 pmWhat is there to code? What complicated problems? I dont see any. Its just a sorting order, and that only applies to the filenames doesnt it (for a scope)? If properly implemented, every one would has his sorting order according to their language.Had a quick read (https://www.gnu.org/software/libc/manual/html_node/Collation-Functions.html):It gets even more complicated (than only the letter-case) with other languages. So why is it then not implemented?I am glad, that is is just the letter-case, that creates an issue for me, because i can spare them. People with other languages are not that fortunate here:Quote

author: nctnico
author_rank: Super Contributor
timestamp: February 15, 2025, 06:14:29 pm
content: Quote from: eTobey on February 15, 2025, 06:04:48 pmIndeed. It is just a matter of selecting the locale and Linux takes care of everything. The existing language setting could be used for that. Because the selection of languages is controlled by what the UI offers, there is zero risk of unintended things happening because the user can't select an unsupported language. But there are some caveats as the locale setting also modifies the way C interprets & formats numbers. This could affect producing & interpreting CSV files and user input but this is easely solved by forcing the locale before producing the numbers or processing the input.

author: KungFuJosh
author_rank: Super Contributor
timestamp: February 15, 2025, 08:22:21 pm
content: Depends on the packages included with (what I assume) is a very customized/streamlined Linux install. How many language packages are included? Do those definitions go beyond the limited vocabulary for what the scope actually needs? The more convoluted everything gets, the more resources the scope needs, and we know that's limited at this price point...despite the nitpicky trivial nature of this topic. 😉

author: mwb1100
author_rank: Frequent Contributor
timestamp: February 15, 2025, 09:38:19 pm
content: Quote from: eTobey on February 15, 2025, 02:52:12 pmIn general setting the language for an embedded/single use device often doesn't do anything with the locale. It just selects that a different table of strings used to display text (labels, documentation, menu choices, etc). If anything "dynamic" is done differently it would be to switch between the sensible DD/MM/YYYY and the less optimal MM/DD/YYYY formats - if I had a hand in specifying how dates should be displayed, I'd push for the most sensible YYYY-MM-DD format. As for the timezone, setting it on standalone devices often only affects NTP.I don't know the magnitude of resources used when full locale support gets pulled into a build compared with just using the "C" locale. But I'm sure it's not zero so there is some cost at the very least in the storage required for library code and tables, but also costs in testing and making sure that any differences in the way that things are displayed are accommodated.I could be wrong, but I wouldn't be surprised if nearly every standalone oscilloscope just uses the "C" locale for sorting lists of filenames.Quote from: eTobey on February 15, 2025, 10:43:57 amKeep in mind that I was talking about making sure file names sorted in a way that I want by talking care of those issues myself using a naming convention. I don't consider that much of a burden. If I ran into a problem with the list of files being a pain to use (as in your example), right or wrong I'd likely blame myself for being careless with my naming rather than blame the vendor. To be clear: I think it's legitimate to ask that the vendor do better, I'm just saying that it probably wouldn't occur to me. I also think it would be legitimate for the vendor to respond that fixing such a problem is a low priority. Which often means it will never be addressed.

author: 44kgk1lkf6u
author_rank: Regular Contributor
timestamp: February 15, 2025, 10:01:34 pm
content: Quote from: eTobey on February 15, 2025, 06:04:48 pmThanks for reminding us that it already has a language option. Forget my previous post. If there is a language option then figuring out how to sort should be straightforward. So either they wanted to stick to the tradition of making files like README show up first, or they were just lazy.

author: artag
author_rank: Super Contributor
timestamp: February 15, 2025, 11:25:06 pm
content: Put some directories in the list when you sort them. Some applications list directories first, then files. This is irritating if you're looking for a file (especially if you sort by access rather than name) and can't see it because of the directories.

author: eTobey
author_rank: Super Contributor
timestamp: February 16, 2025, 08:08:42 am
content: Quote from: mwb1100 on February 15, 2025, 09:38:19 pmIn general, manufacturers have a way to change the behaviour of their product.Quote from: mwb1100 on February 15, 2025, 09:38:19 pmIndeed, the resources could be a reason that they did not care. But is it really the full locale support? As the other guy stated, its just one entity, that determines the sorting order?But i dont think there wouldnt be much to test. Test 2-3 languages, and the rest should be just fine.Quote from: mwb1100 on February 15, 2025, 09:38:19 pmI will bet, that the DHO800 does perfectly fine in this regard. Also the better brands above Siglent.Quote from: mwb1100 on February 15, 2025, 09:38:19 pmMe neither, i totally agree. I think you got my sentence wrong. Never mind.Quote from: 44kgk1lkf6u on February 15, 2025, 10:01:34 pmNever heard of that tradition. I guess they are just lazy. Just as lazy, as they did not test their product that good. (seehttps://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5455364/#msg5455364there were quite a few bugs)Quote from: artag on February 15, 2025, 11:25:06 pmI am done with this issue. No more testing. I found quite a few bugs (see link above). Small, bigger, and some false, but the fanboys were (and still are)alwaysafter me. Always denying i found any bugs, or that those where no issues at all.

author: shabaz
author_rank: Frequent Contributor
timestamp: February 16, 2025, 09:22:06 am
content: I've not been following any threads of issues mentioned in your post, so I don't know what process you're using. I could be wrong here, but it seems to me there are better ways to make progress than questioning every issue at length. Use your judgment to decide if it's a problem or perhaps if something was simply not a requirement and, therefore, didn't get implemented because there was no major use for it.When I got my 'scope, I found a load of "things" (all complex instruments will have them), in my case 27 of them to be precise! which could have been bugs or unexpected behavior as far as I was concerned.I simply created a Word document containing the issue title, a description of expected behavior and what I saw, and pasted in any relevant screenshots, and mentioned what the impact was to me. I didn't write it up very formally, although I could have; one could create or ask for a template; it's up to you. I've done a similar thing with other types of instruments in the past too. Similarly, I would hope customers would provide me with an issues list too.NOTE: sometimes it's bad to mix everything into a single report; usually, manufacturers may prefer separate reports, but I used my judgment to decide if, for a new product, it may be easier for the manufacturer to see a single list to quickly scan through and let them raise the issues internally as they see fit.I submitted the single Word doc directly to the manufacturer (by raising a single problem request online with just the list of issue titles and asking for an e-mail address to send them the Word doc with the entire detail).After examining the doc, they came back with an explanation for each item (whether it was a genuine bug, deliberate behavior, operator error, feature request, and so on). They then went off and created their own tickets for any bugs/enhancements, etc., and dealt with them.I know you're simply trying to highlight what you believe is a problem, but many people may not even store a lot of files on a 'scope, so the ordering not matching localization might be irrelevant to them.On some instruments, I may store hundreds of files, but on a 'scope, I tend to have a few configs. Any screenshots get pulled off quickly, they are as transient as my memory of them will be, unless I transfer to a PC and document it as soon as I've captured it.Your use case may be different, and perhaps some are in a country where it impacts them more due to language (I have no idea), or you may well store a lot of files and switch between capitalization and non-capitalization (whereas others may stick with all lower-case for instance - there's no right or wrong). Personally it's hard for me to see it as a major issue because I can't imagine the particular scenario. You should mention your scenario and the impact to you when you raise your problem report, so they can prioritize accordingly.

author: tv84
author_rank: Super Contributor
timestamp: February 16, 2025, 10:31:12 am
content: Quote from: eTobey on February 16, 2025, 08:08:42 amBy now you should already have understood that it's not the question of what bugs or under-features you discover but the way you defend those, against other one's opinions.It's like you apply to others comments the same methodology that you accuse Siglent of doing with the issues you raise.

author: eTobey
author_rank: Super Contributor
timestamp: February 16, 2025, 11:15:35 am
content: Quote from: shabaz on February 16, 2025, 09:22:06 amYes, doing this with a word document is a good idea. Just a little bit too late.If i would have known the number of bugs/issues, and how difficult it would have been to get others to understand, i would have acted differently. Mostly i was frustrated, because people (with knowledge) often just didnt read or comprehend, and giving responses about things that were barely relevant (there were of course exceptions).It seems these days, people take questions as refusal/denial right away, and dont realise, that some folks just want to learn and understand.Quote from: tv84 on February 16, 2025, 10:31:12 amOnly a few bugs could be discussed with presenting any opinions. Quite often, there were issues that were clear bugs (for example: the knob changing two settings at the same time / holdoff not working / ...), and yet people denied and said user error. Questions were barely answered.Dont believe me? Check this out:The issue:https://www.eevblog.com/forum/testgear/sds800x-hd-bugswanted-features/msg5422535/#msg5422535They say no its not a bug:https://www.eevblog.com/forum/testgear/sds800x-hd-bugswanted-features/msg5422937/#msg5422937The bug was resolved by Siglent:(See attachment)Best thing is: one guy first confirmed the bug, but then denied it. Did he get some reward for a bugreport, or does he just have some issue?

author: madires
author_rank: Super Contributor
timestamp: February 16, 2025, 01:25:30 pm
content: As someone who has written a few X11 programs I'd like to add that there's no linux file sorting order. Any sorting is done by the application or widget set / GUI framework, including support for localization.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: February 16, 2025, 02:25:33 pm
content: For decades I've named all files and images by date, using yymmdd. Today a file name might be 250216_shinything.ext. That does two things. I can find things in the future and they sort in a sensible manner. maybe there's some obscure sorting problem, but I've yet to have it be any hinderance. If you're really a nutcase, use the Julian date, though there are several versions of that.

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 16, 2025, 03:21:39 pm
content: If you want sensible order by date, useISO 8601numeric date format: YYYY-MM-DD (or YYYYMMDD). This is the only sort order that always sorts in correct date order regardless of locale.Generally,language.utf8locales collate case insensitively if installed, includingen_US.utf8,en_GB.utf8,en_AU.utf8,en_IE.utf8, anden_NZ.utf8. TheC.UTF-8locale does not. You can runlocale -ato list all installed locales. If a locale is not installed, thenCis used instead.To set the entire locale, you set eitherLANGorLC_ALLto the name of the locale you want. Make sure it is written exactly likelocale -ashows.When neitherLANGnorLC_ALLare set, you can set different facets of the locale by setting specificLC_categoryvariables as explainedhere. For example, settingLC_COLLATE=en_GB.utf8andLC_TIME=en_CA.utf8to use British sort order but Canadian English date format (WkD DD Mon YYYY HH:MM:SS am tz). Theen_GB.utf8anden_US.utf8date format put the year last.To see what your locale is currently set to, runlocale. If the value following the equals sign (=) is in quotes, it is implicitly set; if it is not in quotes, it is explicitly set; if there is nothing after the equals sign (=) it is not set. Usually, onlyLC_ALLis not set (i.e, usually you seeLC_ALL=but all others with a value.)In Linux systems, you can find the default locale settings for all users in/etc/defaults/locale, but each user can change these in their profile; for Bash users, these would be.bash_profileor.profilein the user home directory. (Bash, sh, and POSIX shells read global defaults first, from/etc/profile.)My own locale in Linux is a mix ofen_US.utf8andfi_FI.utf8. I like character classes, dates, sort order, monetary values, and measurements in Finnish, soLC_CTYPE,LC_TIME,LC_COLLATE,LC_MONETARY,LC_PAPER,LC_NAME,LC_ADDRESS,LC_TELEPHONE,LC_MEASUREMENT, andLC_IDENTIFICATIONarefi_FI.utf8; but I prefer US numeric formats, and error messages and such in English, soLC_NUMERIC, andLC_MESSAGESareen_US.utf8. This works fine, and e.g. LibreOffice and other desktop applications "inherit" these automatically, although they of course let me override them on a per-application basis (without doing any scripting shenanigans).

author: 2N3055
author_rank: Super Contributor
timestamp: February 16, 2025, 04:09:36 pm
content: Quote from: eTobey on February 16, 2025, 11:15:35 amIt is funny that you took that example. Because it is one of examples how you take something and then lie about what happened. Bug was confirmed, way before. We complained that you kept reporting it several times, repeatedly. Because you probably think if you report same issue 10 times it will be fixed faster or something.And your "bug reports" a mostly whiny complaints that "something doesn't work" with some video or image that explains nothing.We complained on many occasions ( and I say we, many people complained about you) that what you show is not something we can use to prove and reproduce a problem you claimed. And 80% of your complaints were not bugs, but your ignorance or arrogance where you demand things like a spoiled child. And yes calling us names all the time.What you are suffering is paranoia. Nobody is out to get you. We are just sick of your abuse.And this very topic is basically your diagnose in plain sight.This is kind of "problems" you hang on to and make a big deal out of nothing.No wonder people pay no attention to your claims. They carry no weight.You have no sense of priority or what is and what is not important.

author: 2N3055
author_rank: Super Contributor
timestamp: February 16, 2025, 04:12:00 pm
content: Quote from: Conrad Hoffman on February 16, 2025, 02:25:33 pmSame here, but also underscores in date: 2024_12_01_Report...

author: nctnico
author_rank: Super Contributor
timestamp: February 16, 2025, 05:08:46 pm
content: Quote from: Conrad Hoffman on February 16, 2025, 02:25:33 pmI don't quite see the benefit of doing that. Any decent file browser provided by an OS can sort the files by creation date (and show the date). Repeating the date in the file name is rather redundant and it obscures the name / subject matter of the file. If you give the file a describtive name and leave dealing with the date to the OS, you can sort the files both by subject and date.

author: KungFuJosh
author_rank: Super Contributor
timestamp: February 16, 2025, 06:00:25 pm
content: Quote from: nctnico on February 16, 2025, 05:08:46 pmCreation dates can get lost or modified. For example, moving to a new drive, an OS might consider the copying of the file(s) the creation date, rather than the date the file was actually created.

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 16, 2025, 07:09:06 pm
content: Quote from: madires on February 16, 2025, 01:25:30 pmOr just the base standard C library with POSIXy addons. Zero extra runtime cost/size compared to plain C, if you dynamically link your executables.To use standard C library with POSIX-2008 addons, you define#define _POSIX_C_SOURCE 200809Lbefore any includes, to make sure the C library will expose the POSIXy stuff; then you include the features, like#include <stdlib.h>#include <locale.h>#include <dirent.h>Near the beginning of yourmain(), you tell the C library you are locale-aware viaif (!setlocale(LC_ALL, ""))fprintf(stderr, "Warning: Current locale is not fully supported.\n");(although you can useLC_COLLATEif you only care about string sorting AKA collation order). Then, you use something likestruct dirent **namelist = NULL;int count = scandir(directory, &namelist, NULL, alphasort);if (count == -1) {// Failed, check errno or use strerror(errno)} else {// namelist through namelist[count-1] contains the directory listing// namelist->d_name is the actual file name; no directory prefixfree(namelist);}to scan the contents of directorydirectory,"."being the current working directory, and you will get the directory listing in the user's preferred collation order. And in pretty efficient manner (quicksorted), even if you have lots of files in that directory.Similarly, if you useglob()(without theGLOB_NOSORTflag), the files matching the search pattern will be sorted in user's collation order. In particular, globbing"./*"will yield the exact same list in the exact same order asscandir()withalphasort(); globbing is just slightly slower. If you have multiple patterns to check, you can usefnmatch()to check if file names or other strings match a globbing pattern.This is the main difference between POSIX C and the "standard" C that most C programmers get taught. Nobody but Microsoft uses the non-POSIX standard library; even BSDs have most ofPOSIX interfacesincluded in their standard C library. We even have a quite good POSIX regular expression compiler and parser,regex, built in. It usesPOSIX basic regular expressionsby default, or if you use theREG_EXTENDEDflag, the POSIX extended regular expressions. They differ slightly from Perl regular expressions, especially regarding character classes. Not to mention stuff likeiconv(),nftw(),gettext()(often via macro_, so that you can localize your strings via_("This is easily localized string")), and many more.Life is easy when you use POSIX, and forget about the idioticopendir()/readdir()/closedir()stuff. (Besides, the POSIXy ones are supposed to handle concurrent file and directory renames and moves nicely, instead of e.g. returning a renamed file twice as easily happens with the idiotic approach.)

author: nctnico
author_rank: Super Contributor
timestamp: February 16, 2025, 07:44:24 pm
content: Quote from: KungFuJosh on February 16, 2025, 06:00:25 pmThat would be a weird situation. Maybe a broken OS or filesystem repair/recovery utility may do such a thing. It makes no sense to alter the creation date of a file when making a copy; that defeats the purpose of having a file creation date. On my system the files (some over 3 decades old!) have their creation dates intact between moves from various PCs, Windows versions and a move to Linux.

author: tv84
author_rank: Super Contributor
timestamp: February 16, 2025, 07:58:18 pm
content: Quote from: nctnico on February 16, 2025, 07:44:24 pmUnfortunately there are very common tools that make you loose the original timestamps, not so much of broken utils.The original ZIP file format supports only "last modification" time as a timestamp. So, transfering files via this way (in Windows) makes you loose the other 2 timestamps corrupting the creation timestamp.Nonetheless, I agree with you that timestamp should not be in a filename.

author: KungFuJosh
author_rank: Super Contributor
timestamp: February 16, 2025, 08:07:56 pm
content: Yeah, I'm speaking from experience from system / drive upgrades. Changing drives can easily screw up the original date. Sometimes it will show the modification date as the correct creation date- see attached.Personally, if I'm organizing files I'll put the date on a folder, and leave the filenames alone.

author: 2N3055
author_rank: Super Contributor
timestamp: February 16, 2025, 08:25:37 pm
content: Quote from: tv84 on February 16, 2025, 07:58:18 pmThere are many files that you want to sort by they "given date" and not creation or changed date.Like some offers, documents you send out so you can reference them to something.I don't think scope should automatically append/prepend date to internal file types filenames.As far as I am concerned, if I need something specific I name it specific. If I have many files in series, I dump then to SMB share, in separate folder and all I need it names them differently in ascending order..Every else more complicated naming I just do on PC...

author: mikes
author_rank: Regular Contributor
timestamp: February 16, 2025, 09:53:51 pm
content: Quote from: nctnico on February 16, 2025, 05:08:46 pmThat depends on having a reliable time source to stamp the files in the first place. This thread was triggered by how the Siglent SDS800X HD series sorts filenames. That scope doesn't have a battery backed RTC, time needs to be set manually or with NTP at each power up in order for it to be correct.

author: eTobey
author_rank: Super Contributor
timestamp: February 17, 2025, 07:09:09 am
content: Quote from: Conrad Hoffman on February 16, 2025, 02:25:33 pmNaming screenshots this way would be just sensible. I wonder why Siglent hasnt done it this way. Oh wait... it doesnt have a RTC.Quote from: nctnico on February 16, 2025, 05:08:46 pmFile dates can be altered. "Total commander" does this for example, when uploading files.Quote from: tv84 on February 16, 2025, 07:58:18 pmI disagree: When investigation issues, its sometimes very important to know, what happend at a point in time (With firmware version xy for example).

author: m k
author_rank: Super Contributor
timestamp: February 17, 2025, 07:49:41 am
content: Quote from: 2N3055 on February 16, 2025, 04:12:00 pmI use sub categories by putting underscores in front of names.Two is still practical.

author: KungFuJosh
author_rank: Super Contributor
timestamp: February 17, 2025, 01:58:25 pm
content: Quote from: eTobey on February 17, 2025, 07:09:09 amYoucouldspend more money and get a scope with an RTC. Personally, I didn't buy the SDS800X HD because it can't make me coffee in the morning...and I don't even drink coffee!

author: tv84
author_rank: Super Contributor
timestamp: February 17, 2025, 03:25:33 pm
content: Quote from: KungFuJosh on February 17, 2025, 01:58:25 pmBut I bet it would be able to sort your coffee grain collection by season, tonnage, color, flavor and, of course, date. That was a bad call!

author: mikes
author_rank: Regular Contributor
timestamp: February 17, 2025, 04:48:38 pm
content: Quote from: KungFuJosh on February 17, 2025, 01:58:25 pmAs usual, he exaggerated. The scope does have an RTC. It's just not battery backed, so time has to be reset on each power cycle. That's basically automatic if you leave it connected to a network, as it will use NTP. Otherwise, it can be done manually.