News for hackers. Stuff that matters.
Re:BlurHash: Algorithm to generate compact representation of... by lvh on Thursday February 20, 2020 @09:41AM (#22375359)
Fair! I would not expect the image be saved to a Windows path when displaying a blurred image in the example use cases (mobile apps and web pages). You're thinking Electron, perhaps?

Point of order though: I don't think that's right for MacOS, though you're certainly right for Windows. HFS+ lets you use any Unicode symbol including NUL (because the filenames are encoded Pascal-style). I don't know the details how how APFS does it, but it also appears to support any Unicode code point, though it additionally mandates UTF-8. [0]

[0] https://developer.apple.com/library/archive/documentation/Fi... grep "filenames"

Re:BlurHash: Algorithm to generate compact representation of... by css on Thursday February 20, 2020 @09:54AM (#22375438)
Interesting, I was not aware about MacOS. If I run `touch :.:` it will run fine and create the file, but Finder disallows this for whatever reason:

    The name “:.:” can’t be used.
    Try using a name with fewer characters, or with no punctuation marks.
Re:BlurHash: Algorithm to generate compact representation of... by DagAgren on Thursday February 20, 2020 @10:19AM (#22375631)
Finder exchanges : and / in filenames, for compatibility with classic MacOS, which used : as a directory separator and allowed / in filenames. You can create a file named / in Finder, and it will show up as : on the file system.
Re:BlurHash: Algorithm to generate compact representation of... by _kst_ on Thursday February 20, 2020 @01:41PM (#22377434)
A file name with an embedded NUL character couldn't be passed to fopen(), or to any other function that takes a pointer to a C-style string. (Not directly relevant here.)