backslash

Roger Oberholtzer roger at opq.se
Thu Jun 26 01:31:03 PDT 2008


On Thu, 2008-06-26 at 09:21 +0100, Jorge Almeida wrote:
> On Thu, 26 Jun 2008, Roger Oberholtzer wrote:
> 
> 
> > Ahhh. Light bulb. You are looking for a character that cannot (as
> > opposed to 'should not in common usage') occur in a file name. I thought
> Hmmm, quite the contrary, actually. I'm looking for a character that
> will not appear in the path of a file distributed with a real package (I
> know that backslashes and even stranger things can appear in a file name
> if we choose to do it, but the question is "will a developer do it?", or
> are there some universally accepted guidelines?)
> >
> >
> > I can't think of any character that will not occur. I have put control
> > characters in names (crummy too.slow keyboards).
> >
> > Perhaps you could choose some obscure utf-8 character. Even though Linux
> > file systems are often utf-8, you could choose some obscure Burmese
> > character that seldom shows up in a file name...
> >
> I know nothing about this kind of stuff. It would have to be something
> that I can manage through a lean C program, not requiring some strange
> library...

utf-8 is only a 16-bit (a.k.a. wide) character set. All this is
available in C. For example, the utf-8 compatible printf is called
wprintf.  All these are controlled by the LC_CTYPE environment variable.
You could set this in your code (via setenv in C) to some obscure
locale, like the suggested Burmese, and then use a character from that
in your work. It is actually very little different in your code (depends
on your code) to do this. Granted this has 'hack' written all over it...


> 
> Jorge
> _______________________________________________
> Linux-users mailing list ( Linux-users at linux-sxs.org )
> Unsub/Password/Etc: 
> http://linux-sxs.org/mailman/listinfo/linux-users
> 
> Need to chat further on this subject? Check out #linux-users on irc.linux-sxs.org !
-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Office: Int +46 8-615 60 20
Mobile: Int +46 70-815 1696

And remember:

It is RSofT and there is always something under construction. 
It is like talking about large city with all constructions finished. 
Not impossible, but very unlikely.





More information about the Linux-users mailing list