News for hackers. Stuff that matters.
Re:Arc's Unicode support (by the news.yc patch writer) by bayareaguy on Friday February 08, 2008 @10:34PM (#112532)
Hmm... I guess that makes me a liar too.

  powerbook.local 104> cat > foo.py
  # -*- coding: <utf-8> -*-
  def ô():
	return "ô"
  powerbook.local 105> python foo.py
    File "foo.py", line 2
  SyntaxError: Non-ASCII character '\xc3' in file foo.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  powerbook.local 106>

Now if you actually go look at the web page in the error message, you should notice that the encoding doesn't include the < >.

But even when the encoding is set properly python still complains:

  powerbook.local 106> cat > foo.py
  # -*- coding: utf-8 -*-
  def ô():
      return "ô"
  powerbook.local 107> python foo.py
    File "foo.py", line	2
      def ô():
	  ^
  SyntaxError: invalid syntax
  powerbook.local 108>
Re:Arc's Unicode support (by the news.yc patch writer) by anewaccountname on Saturday February 09, 2008 @04:31PM (#112791)
Are you sure you don't mean 'cat foo.py' or maybe 'cat - < foo.py'?
Re:Arc's Unicode support (by the news.yc patch writer) by bayareaguy on Saturday February 09, 2008 @06:32PM (#112827)
Yes, I'm sure.

cat > foo.py copies standard input into the file foo.py. The rest of the characters you're seeing in the message are what I typed in. The only character you don't see is the Ctrl-D I type to indicate EOF. This is a quick and easy way of creating foo.py without using an editor.

Re:Arc's Unicode support (by the news.yc patch writer) by anewaccountname on Sunday February 10, 2008 @09:43PM (#113191)
Ah, now I see.