Hi, > I'm trying to compile a C++ software on FreeBSD. While compiling, this > error shows up: > > error: stray '\357' in program > error: stray '\273' in program > error: stray '\277' in program > > This file is reported (by file[1]) to be "UTF-8 Unicode (with BOM) C > program text, with CRLF line terminators" while the rest of the files > in the package are "ASCII C program text, with CRLF line terminators". > While I can convert the file with iconv -c -f utf-8 -t ascii file > > new_file in the post extract stage, I wonder if there is a more > suitable way for achieving the same thing. Also I would like to avoid > this software from depending on iconv.
You have three options: - have it fixed upstream; - post process on extract like above; - post process releases and roll your own tarball which you host yourself. Fixing upstream is by far the best solution and here's some ammunition: The Unicode Standard does permit the BOM in UTF-8, but does not require or recommend its use. Byte order has no meaning in UTF-8 so in UTF-8 the BOM serves only to identify a text stream or file as UTF-8. [1] [1] http://en.wikipedia.org/wiki/Byte_order_mark -- Mel _______________________________________________ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"