in reply to Re^3: running scripts in Mac OS 10.4
in thread running scripts in Mac OS 10.4

Anyone knowingly using anything other than ASCII for their source code is a damned fool. If you need non-ASCII data, such as for text that you'll spit out at the user, that should live elsewhere in a resource file. Not only will that do away with problems like the one you're having, it will also mean that things don't break when someone using a different character set edits your code*, and you'll already be half way to supporting multiple languages.

* any bleating about "everyone should use UTF-8" will be ignored because regardless of whether people should use it the fact is that lots of people don't use it, and you want to keep the "barrier to entry" for them submitting patches that fix your bugs as low as possible.

Replies are listed 'Best First'.
Re^5: running scripts in Mac OS 10.4
by jethro (Monsignor) on Jun 26, 2008 at 12:16 UTC
    Weeeell, everyone should use U... ;-)

    You are almost right when it concerns open source and the here and now (as many OS and script languages are not yet utf8-ready, perl and linux are exceptions AFAIK). But remember that a lot of software is written in other languages without any intention or need for worldwide collaborative development. Why should its programmers jump through loops just to print a message in their native language?

    From a practicability standpoint using utf-8 now might lead to problems. But from the standpoint of non-english-speaking people it is high time that utf8 is in universal use.

    And hopefully those problems lead to faster adoption of utf8 instead of the practical solution. Because otherwise we get the same situation as with IPv4 and IPv6. The intertia of the ones with enough IP-addresses prolong the problems of those with too few.