Professional Web Applications Themes

Standard c wide strings - Mac Programming

Hello, I'm having trouble trying to include standard C++ headers for wide characters, such as wcslen, iswupper etc... In Project Builder. I cannot find <whar.h> anywhere else than in CW headers. Isn't the standard C++ library supported by PB ? Thanks, Eric...

  1. #1

    Default Standard c wide strings

    Hello,

    I'm having trouble trying to include standard C++ headers for wide
    characters, such as wcslen, iswupper etc... In Project Builder.

    I cannot find <whar.h> anywhere else than in CW headers.

    Isn't the standard C++ library supported by PB ?

    Thanks,

    Eric

    Eric VERGNAUD Guest

  2. #2

    Default Re: Standard c wide strings

    In article <BB8A9C6D.12060%eric.vergnaudwanadoo.fr>,
    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    > I'm having trouble trying to include standard C++ headers for wide
    > characters, such as wcslen, iswupper etc... In Project Builder.
    >
    > I cannot find <whar.h> anywhere else than in CW headers.
    >
    > Isn't the standard C++ library supported by PB ?
    wchar.h is not supported in Jaguar. You're encouraged to use the Core
    Foundation string APIs instead, which work far better than the wchar
    APIs.

    -Eric

    --
    Eric Albert [email]ejalbertstanford.edu[/email]
    [url]http://rescomp.stanford.edu/~ejalbert/[/url]
    Eric Albert Guest

  3. #3

    Default Re: Standard c wide strings

    dans l'article [email]ejalbert-F5B278.14475214092003news.stanford.edu[/email], Eric Albert
    à [email]ejalbertstanford.edu[/email] a écrit le 14/09/03 23:47:
    > In article <BB8A9C6D.12060%eric.vergnaudwanadoo.fr>,
    > Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    >
    >> I'm having trouble trying to include standard C++ headers for wide
    >> characters, such as wcslen, iswupper etc... In Project Builder.
    >>
    >> I cannot find <whar.h> anywhere else than in CW headers.
    >>
    >> Isn't the standard C++ library supported by PB ?
    >
    > wchar.h is not supported in Jaguar. You're encouraged to use the Core
    > Foundation string APIs instead, which work far better than the wchar
    > APIs.
    >
    > -Eric
    Oh well...

    Is Apple going the bad way again ?

    I don't care much about the underlying implementation, but why don't they
    simply provide a set of files that do the job, so that our source can be
    cross-platform ?

    Eric

    Eric VERGNAUD Guest

  4. #4

    Default Re: Standard c wide strings

    In article <BB8A9C6D.12060%eric.vergnaudwanadoo.fr>,
    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    > I'm having trouble trying to include standard C++ headers for wide
    > characters, such as wcslen, iswupper etc... In Project Builder.
    >
    > I cannot find <whar.h> anywhere else than in CW headers.
    >
    > Isn't the standard C++ library supported by PB ?
    One of us is confused. The standard C++ library support for wide
    character strings is the same as the support for 8-bit characters:

    std::string is defined as:

    typedef basic_string<char, char_traits<char>, allocator<char> > string;

    and std::wstring is defined as:

    typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >
    wstring;

    All of the functions you've listed (wcslen, iswupper etc ) are C legacy
    functions that you shouldn't need to use in C++.

    Morever functions like iswupper depend on the locale, because a wstring
    just specifies a character width, not a character encoding. (You can't
    tell if the character 0x203E is upper case or not unless you also
    specify something like: the wstring is in UCS-2.)
    David Phillip Oster Guest

  5. #5

    Default Re: Standard c wide strings

    In article <BB8ADBC6.12067%eric.vergnaudwanadoo.fr>,
    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    > dans l'article [email]ejalbert-F5B278.14475214092003news.stanford.edu[/email], Eric Albert
    > à [email]ejalbertstanford.edu[/email] a écrit le 14/09/03 23:47:
    >
    > > In article <BB8A9C6D.12060%eric.vergnaudwanadoo.fr>,
    > > Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    > >
    > >> I'm having trouble trying to include standard C++ headers for wide
    > >> characters, such as wcslen, iswupper etc... In Project Builder.
    > >>
    > >> I cannot find <whar.h> anywhere else than in CW headers.
    > >>
    > >> Isn't the standard C++ library supported by PB ?
    > >
    > > wchar.h is not supported in Jaguar. You're encouraged to use the Core
    > > Foundation string APIs instead, which work far better than the wchar
    > > APIs.
    > Oh well...
    >
    > Is Apple going the bad way again ?
    >
    > I don't care much about the underlying implementation, but why don't they
    > simply provide a set of files that do the job, so that our source can be
    > cross-platform ?
    Well, they haven't provided them yet, but that doesn't preclude Apple
    from providing them in the future. Perhaps they'll be part of a future
    OS release.

    -Eric

    --
    Eric Albert [email]ejalbertstanford.edu[/email]
    [url]http://rescomp.stanford.edu/~ejalbert/[/url]
    Eric Albert Guest

  6. #6

    Default Re: Standard c wide strings

    dans l'article [email]oster-7BF885.21510814092003newssvr21-ext.news.prodigy.com[/email],
    David Phillip Oster à [email]osterieee.org[/email] a écrit le 15/09/03 6:51:
    > All of the functions you've listed (wcslen, iswupper etc ) are C legacy
    > functions that you shouldn't need to use in C++.
    Well I do, as C functions. The fact that they rely on the underlying locale
    makes them just perfect for the common use.


    Eric

    Eric VERGNAUD Guest

  7. #7

    Default Re: Standard c wide strings

    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote in message news:<BB8A9C6D.12060%eric.vergnaudwanadoo.fr>...
    > Hello,
    >
    > I'm having trouble trying to include standard C++ headers for wide
    > characters, such as wcslen, iswupper etc... In Project Builder.
    >
    > I cannot find <whar.h> anywhere else than in CW headers.
    >
    > Isn't the standard C++ library supported by PB ?
    No, they aren't.

    No, they don't seem to consider it a problem.

    Yes, it's annoying, especially because it's a C standard,
    in spite of the fact that neither the Windows nor the Linux
    implementations are fully compliant with the standard.

    And it's doubly annoying, because wchar_t is defined, and
    it's a 32-bit integer, whereas the Mac stuff uses UTF-16.

    And I've had to make my own equivalence library.

    No, I can't release it, becaue that was under a contract
    job.

    But it sounds like a good free software project.
    Eric Pepke Guest

  8. #8

    Default Re: Standard c wide strings

    In article <BB8ADBC6.12067%eric.vergnaudwanadoo.fr>,
    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    > I don't care much about the underlying implementation, but why don't they
    > simply provide a set of files that do the job, so that our source can be
    > cross-platform ?
    Instead of Project Builder, you might consider CodeWarrior which has a
    more conforming C library than Apple's.
    Sean McBride Guest

  9. #9

    Default Re: Standard c wide strings

    dans l'article [email]cwatson-4395B6.21020516092003aeinews.aei.ca[/email], Sean McBride à
    [email]cwatsoncam.org[/email] a écrit le 17/09/03 3:02:
    > In article <BB8ADBC6.12067%eric.vergnaudwanadoo.fr>,
    > Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    >
    >> I don't care much about the underlying implementation, but why don't they
    >> simply provide a set of files that do the job, so that our source can be
    >> cross-platform ?
    >
    > Instead of Project Builder, you might consider CodeWarrior which has a
    > more conforming C library than Apple's.
    Thanks, I'm using CW 99% of the time on Mac. However, 8.3 doesn't support
    Objective-C, and 9 doesn't support Java. So I switched to PB for a small
    Cocoa bundle.

    Thanks

    Eric VERGNAUD Guest

  10. #10

    Default Re: Standard c wide strings

    In article <BB8D847A.121F4%eric.vergnaudwanadoo.fr>,
    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    > Thanks, I'm using CW 99% of the time on Mac. However, 8.3 doesn't support
    > Objective-C, and 9 doesn't support Java. So I switched to PB for a small
    > Cocoa bundle.
    8.3 does support Objective-C, but only minimally. That is, it compiles
    quite fine, but there is no syntax colouring, function popup, etc. that
    does make it somewhat of a pain.
    Sean McBride Guest

  11. #11

    Default Re: Standard c wide strings

    In article <BB8D847A.121F4%eric.vergnaudwanadoo.fr>,
    Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    >dans l'article [email]cwatson-4395B6.21020516092003aeinews.aei.ca[/email], Sean McBride à
    >cwatsoncam.org a écrit le 17/09/03 3:02:
    >
    >> In article <BB8ADBC6.12067%eric.vergnaudwanadoo.fr>,
    >> Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    >>
    >>> I don't care much about the underlying implementation, but why don't they
    >>> simply provide a set of files that do the job, so that our source can be
    >>> cross-platform ?
    >>
    >> Instead of Project Builder, you might consider CodeWarrior which has a
    >> more conforming C library than Apple's.
    >
    >Thanks, I'm using CW 99% of the time on Mac. However, 8.3 doesn't support
    >Objective-C, and 9 doesn't support Java. So I switched to PB for a small
    >Cocoa bundle.
    Certainly CW 9 supports Objective C (as well as ObjC++) we've had it
    before OS X was out.
    Ron

    --
    CodeWarrior Development Studio for Macintosh v9
    Enhance Your Productivity and Shorten your Development Cycles
    <http://store.metrowerks.com/>
    Sales and Support 512-996-5300 800-377-5416
    Ron Liechty - [email]MWRonmetrowerks.com[/email] - [url]http://www.metrowerks.com[/url]
    MW Ron Guest

  12. #12

    Default Re: Standard c wide strings

    dans l'article [email]cwatson-3EBE63.08023517092003aeinews.aei.ca[/email], Sean McBride à
    [email]cwatsoncam.org[/email] a écrit le 17/09/03 14:02:
    > In article <BB8D847A.121F4%eric.vergnaudwanadoo.fr>,
    > Eric VERGNAUD <eric.vergnaudwanadoo.fr> wrote:
    >
    >> Thanks, I'm using CW 99% of the time on Mac. However, 8.3 doesn't support
    >> Objective-C, and 9 doesn't support Java. So I switched to PB for a small
    >> Cocoa bundle.
    >
    > 8.3 does support Objective-C, but only minimally. That is, it compiles
    > quite fine, but there is no syntax colouring, function popup, etc. that
    > does make it somewhat of a pain.
    Thanks, I've moved back to CW anyway. GCC is so sloooow, that I just can't
    get used to it.

    Eric

    Eric VERGNAUD Guest

Similar Threads

  1. Extracting strings delimited by other strings
    By Scott Bass in forum PERL Modules
    Replies: 2
    Last Post: May 7th, 02:26 AM
  2. Replies: 0
    Last Post: August 17th, 07:52 AM
  3. Wide character
    By Cliff Stanford in forum PERL Miscellaneous
    Replies: 1
    Last Post: July 22nd, 07:15 PM
  4. Line too wide
    By PixelWarrior in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 8th, 03:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139