[Fink-devel] Text encoding for .info files?

2005-02-25 Thread Daniel Johnson
Is there a policy about what encoding to use for .info files? The fink 
tool (or specifically perl 5.8.x) and online package database seem to 
expect Unicode while FinkCommander assumes MacRoman. There are two 
files, gtktalog.info and recode.info, that use MacRoman in the 
Maintainer field. Thus they show correctly in FinkCommander but not 
anywhere else. If I change those files to UTF-8, fink info gives the 
correct result. Of course, then FinkCommander is wrong. :) I came 
across this issue because I'm working on a Cocoa program that reads 
package info from fink, and since Cocoa assumes text is in Unicode, Bad 
Things were happening with those two files. As in crashing. I had to 
explicitly convert the text from MacRoman first, like FinkCommander 
does.

I couldn't find anything in the Packaging Manual about this. Perhaps a 
good policy would be to require all .info files to use UTF-8 and 
document this?

--
Daniel Johnson
[EMAIL PROTECTED]
PGP public key: http://homepage.mac.com/danielj7/publickey.txt


PGP.sig
Description: This is a digitally signed message part


Re: [Fink-devel] Text encoding for .info files?

2005-02-25 Thread Martin Costabel
Daniel Johnson wrote:
I couldn't find anything in the Packaging Manual about this. Perhaps a 
good policy would be to require all .info files to use UTF-8 and 
document this?
I would vote for 7-bit ASCII, if possible. Everything else gives 
trouble. Just look at the package database and try to find the packages 
maintained by the maintainers of gtktalog or recode: 0 packages found. I 
doubt that recoding their names in unicode would help there, but I am 
sure they can live without the accents on their names in the info files.

One of the main advantages of the Fink info format is that it can be 
handled by a wide variety of tools from different backgrounds and with 
different purposes.

--
Martin


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Text encoding for .info files?

2005-02-25 Thread Daniel Macks
On Fri, Feb 25, 2005 at 08:33:04AM -0500, Daniel Johnson wrote:
 Is there a policy about what encoding to use for .info files?

They are supposed to be plain text files in the traditional Unix
sense. As such, I don't think there's is any issue about encoding.
The validator emits a warning if a .info file contains characters not
part of the POSIX :ascii: class.

 The fink tool (or specifically perl 5.8.x) and online package
 database seem to expect Unicode while FinkCommander assumes
 MacRoman. There are two files, gtktalog.info and recode.info that
 use MacRoman in the Maintainer field.

Yup, 'fink validate' on those files gives:

  Warning: maintainer contains non-standard characters. (gtktalog.info)
  Warning: maintainer contains non-standard characters. (recode.info)

 Thus they show correctly in FinkCommander but not 
 anywhere else. If I change those files to UTF-8, fink info gives the 
 correct result. Of course, then FinkCommander is wrong. :) I came 
 across this issue because I'm working on a Cocoa program that reads 
 package info from fink, and since Cocoa assumes text is in Unicode, Bad 
 Things were happening with those two files. As in crashing. I had to 
 explicitly convert the text from MacRoman first, like FinkCommander 
 does.

...and that kind of how do I encode this portably? weirdness is one
of the reasons we want everything in plain-text ASCII. So the proper
solution is to not use non-ASCII chars:) I just patched those two
.info files in 10.3/unstable.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Text encoding for .info files?

2005-02-25 Thread Daniel Johnson
On Feb 25, 2005, at 10:15 AM, Daniel Macks wrote:
On Fri, Feb 25, 2005 at 08:33:04AM -0500, Daniel Johnson wrote:
Is there a policy about what encoding to use for .info files?
They are supposed to be plain text files in the traditional Unix
sense. As such, I don't think there's is any issue about encoding.
The validator emits a warning if a .info file contains characters not
part of the POSIX :ascii: class.
The fink tool (or specifically perl 5.8.x) and online package
database seem to expect Unicode while FinkCommander assumes
MacRoman. There are two files, gtktalog.info and recode.info that
use MacRoman in the Maintainer field.
Yup, 'fink validate' on those files gives:
  Warning: maintainer contains non-standard characters. 
(gtktalog.info)
  Warning: maintainer contains non-standard characters. (recode.info)
Heh. I didn't think to try 'fink validate'. Duh.
Thus they show correctly in FinkCommander but not
anywhere else. If I change those files to UTF-8, fink info gives the
correct result. Of course, then FinkCommander is wrong. :) I came
across this issue because I'm working on a Cocoa program that reads
package info from fink, and since Cocoa assumes text is in Unicode, 
Bad
Things were happening with those two files. As in crashing. I had to
explicitly convert the text from MacRoman first, like FinkCommander
does.
...and that kind of how do I encode this portably? weirdness is one
of the reasons we want everything in plain-text ASCII. So the proper
solution is to not use non-ASCII chars:) I just patched those two
.info files in 10.3/unstable.
dan
Plain ASCII works for me. But unless I missed it (which isn't outside 
the realm of possibility), it's not documented anywhere and probably 
should be.

Thanks.
--
Daniel Johnson
[EMAIL PROTECTED]
PGP public key: http://homepage.mac.com/danielj7/publickey.txt


PGP.sig
Description: This is a digitally signed message part