[Nut-upsdev] Character-encoding in code and docs
Peter Selinger
selinger at mathstat.dal.ca
Fri Feb 10 13:51:25 UTC 2006
I think he was referrring to *comments* in source files, and there
should be no problem at all regarding portability.
I agree that we should avoid international characters in strings,
unless we add proper internationalization support to NUT.
I vote for UTF-8 as the encoding standard, with unix-style line
terminators.
Currently we have the following text files with non-ASCII or '\r'
characters:
NEWS: UTF-8 Unicode English text
data/driver.list: UTF-8 Unicode English text
debian/changelog: UTF-8 Unicode English text
drivers/bcmxcp.c: UTF-8 Unicode C program text
drivers/belkin.c: ISO-8859 C program text
drivers/belkin.h: ISO-8859 C program text
drivers/oneac.h: ASCII C program text, with CRLF, LF line terminators
drivers/solis.c: UTF-8 Unicode C program text
drivers/upscode2.c: UTF-8 Unicode C program text
drivers/upscode2.h: UTF-8 Unicode C program text
man/bcmxcp.8: ISO-8859 troff or preprocessor input text
man/bcmxcp_usb.8: ISO-8859 troff or preprocessor input text, with CRLF line terminators
man/oneac.8: ASCII troff or preprocessor input text, with CRLF, LF line terminators
man/solis.8: UTF-8 Unicode troff or preprocessor input text
man/upscode2.8: ISO-8859 troff or preprocessor input text
debian/po/ca.po: UTF-8 Unicode English text
debian/po/cs.po: ISO-8859 English text
debian/po/fr.po: ISO-8859 English text
debian/po/vi.po: UTF-8 Unicode English text, with very long lines
docs/cables/mgeups.txt: ASCII English text, with CRLF line terminators
docs/cables/powerware.txt: ISO-8859 text
Also, CHANGES used to contain Unicode characters, but they got so
mangled by different editors that they are no longer there.
-- Peter
Arjen de Korte wrote:
>
>
> > On Fri, Feb 10, 2006 at 07:37:35AM -0500, Charles Lepple wrote:
> >> I think I have seen a few files with latin-1 characters in the
> >> comments (changelog as well), and that's probably what Niels is
> >> referring to.
> >
> > Yes, this was personal names in comments and copyrights.
> > Also, the CREDITS file could easily end up containing names with
> > characters outside the ASCII repertoire.
>
> I understand you wish to have your name written as it is supposed to be
> written, but unfortunately there is no portable way to do so, unless we
> start using generated files (based on the localization) for all of these.
> In that case we need to agree on an encoding standard and do some magic i=
> n
> the makefiles to convert these according to the localization on the syste=
> m
> we're building on (if possible at all).
>
> That doesn't need to stop you from using whatever kind of encoding in you=
> r
> sourcefiles, as long as you make sure that they are between /* and */, yo=
> u
> should be fine. Of course there is no guarantee that the person viewing
> these files is seeing what you intended to be seen.
>
> Regards, Arjen
>
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
>
More information about the Nut-upsdev
mailing list