[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#99933: second attempt at more comprehensive unicode policy

On Sun, Jan 05, 2003 at 12:09:09PM -0500, Colin Walters wrote:
> On Sun, 2003-01-05 at 09:23, Denis Barbier wrote:
> > On Sat, Jan 04, 2003 at 12:10:42PM -0500, Colin Walters wrote:
> > [...]
> > > What *is* debatable is when and how to make the transition, which is
> > > what we're doing now.
> > [...]
> > 
> > So how to implement your proposal?
> > The main issue is to patch glibc API so that filenames are supposed
> > to be UTF-8 encoded.  Has this already been discussed?
> What do you mean?  What changes to the glibc API would be required?
> If you are suggesting that functions like readdir() attempt to convert
> filenames from UTF-8 into the user's current locale, I am completely
> against that.  It will just exacerbate the problem.

Here is an excerpt of your proposal:
        Programs should expect filenames in general (whether from
        a Debian package or created by the user) to be encoded
        with UTF-8, although it is recommended for programs to try
        gracefully falling back to the current locale's encoding
        if this fails.  Programs included in Debian packages
        should, when creating new files, encode their names in
        UTF-8 by default.

Consider a program written in C, which creates new files with open(2);
if I understand your proposal right, when a filename is not UTF-8
encoded, it should be converted into UTF-8 according to user's locale.
I am wondering how to perform this task:
  a. Let open() perform this conversion.
  b. Add a utility function in a common library and patch all programs
     to add calls to this routine.
  c. Let all programs perform their own checks.
  d. ... Others?

How do you think your proposal should be implemented?


Reply to: