[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions on Windows port of tools
From: |
address@hidden |
Subject: |
Re: Questions on Windows port of tools |
Date: |
28 Mar 2007 08:52:36 -0700 |
User-agent: |
G2/1.0 |
On 28 Mrz., 16:26, Michael Hopkins <michael.hopk...@hopkins-
research.com> wrote:
> 1) Is there a way to printf() Unicode characters (i.e. other than the normal
> ASCII set) in a console? Currently, these characters that look fine on OS X
> & Linux produce rubbish (but different rubbish) in the Windows Command
> Prompt and MSYS pseudo-UNIX terminals.
>
> 2) The above may (or may not) have something to do with user defaults but
> it's not easy to find out how to set these up or even if we need to for a
I can't comment on the other items, but printf or NSLog always simply
print what they get as a byte stream.
So, if you do a printf("%s", [@"äöü" UTF8String]); you will get UTF-8
characters to the console.
Now, the Terminal of OS X and Linux may interpret that as UTF-8 .
While the console you use
on Windows may interpret it differently. So, you should probably make
the character encoding of
your terminal match the encoding that is sent by printf.
-- hns