• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: swprintf fails with extended character codes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: swprintf fails with extended character codes


  • Subject: Re: swprintf fails with extended character codes
  • From: "Paul Sanders" <email@hidden>
  • Date: Wed, 14 Apr 2010 13:29:37 +0100


On 04/14/2010 11:02 AM, Ben Staveley-Taylor wrote:
>
> Knowing now how unportable and vaguely specified wchar_t is, I realise
> that we should have avoided it all those years ago when we did our
> Unicode Windows codebase. Things are always clearer in hindsight!

Ben, don't throw the baby out with the bathwater.  Having overcome the swprintf issue, and with the benefit of a few utility routines to convert between TCHAR [], UTF-8 [] and NSString, I am now happily using my existing TCHAR-based code in my cross-platform app.  I much prefer this approach to rewriting a substantial, well-tested code base.  As a matter of coding style, I find the power of swprintf and the convenience of walking a pointer through a TCHAR * hard to beat, but I think a lot of that is just habit.
 
Contact me off-list if you'd like a few code snippets.  No charge :)  You will need to hack them around to suit your needs (they are part of a larger 'Windows Compatibility' library) but it's all downhill once the foundations are in place.  Like you, I struggled with missing or incompatible Windows runtime library functions on the Mac when I first started bringing my code across.
 
Paul Sanders.
 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: swprintf fails with extended character codes (From: Ben Staveley-Taylor <email@hidden>)
 >Re: swprintf fails with extended character codes (From: Lehel Bernadt <email@hidden>)

  • Prev by Date: Re: swprintf fails with extended character codes
  • Next by Date: Aggregate build settings ignored
  • Previous by thread: Re: swprintf fails with extended character codes
  • Next by thread: Re: swprintf fails with extended character codes
  • Index(es):
    • Date
    • Thread