realbasic-nug
[Top] [All Lists]

Re: Encodings, Trademarks, Files, and POSIX

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Encodings, Trademarks, Files, and POSIX
From: "Rubber Chicken Software Co." <support@chickensys.com>
Date: Fri, 01 May 2009 01:26:15 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com; domainkeys=neutral header.From=support@chickensys.com
Delivered-to: listarchive@realsoftware.com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=chickensys.com; h=Received:X-Mailer:Date:To:From:Subject:In-Reply-To:References:Mime-Version:Content-Type:X-Identified-User; b=n/IW9Czj8gYHplBt3LnDln4+EigJxtZGjEnmt7EPPAP3fep1txhbzGCohXjOy0X0XjJFSvu47j8t2erNhhlvVgTwRRY56pPxb1oXhFsGZj2gD1CX5JrxkhY7NLsxdCax;
Domainkey-status: unknown
In-reply-to: <1iz0ocm.r5o7m013b5qnoM%realbasiclists@monkeybreadsoftware. de>
References: <1iz0ocm.r5o7m013b5qnoM%realbasiclists@monkeybreadsoftware.de>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
At 08:00 PM 4/30/2009, you wrote:

> Let's say I have a FolderItem in RB, and I have a dylib written in
> C++ that calls the POSIX function lstat() (or stat()) to verify the
> existence of the file.
>
> lstat() takes a char* argument for the path. But under what Encoding?

Have you tried a few? UTF8 maybe?

Thanks for the advice, that did it. Looks like lstat() (in my situation) takes a UTF-16.

http://www1.tip.nl/~t876506/utf8tbl.html

I was using UTF-8, and I should have looked in other instances of my code, where I was doing it right. I switched all my "path-passing" to UTF-16 and all is well now.

Still, I should not be relying on paths in my dylib, so my next project is to get rid of them and use a FolderItem-like object that encapsulates FSRefs for Mac and paths for Windows, just like the RB one does. I've learned a lot so far with Charles Yeomans "IDeclare" chapter, and with a little more I think I'll have it!

Thank you everyone, another learning experience, and now I can sleep.

* * * * * * * * * * * * * * * * * * * * * * * * * * *
| Garth Hjelte                                      |
| Customer Service Representative, President        |
| Chicken Systems, Inc, Rubber Chicken Software Co. |
| 714 5th Street SE                                 |
| Willmar, MN 56201 USA                             |
|                                                   |
| 800-8-PRO-EPS    Toll Free Order Line (US Only)   |
| 320-235-9798     Tech Support, Sampler Questions  |
|                  International Line               |
| 360-838-7689     Fax                              |
| Product Sales:   sales@chickensys.com             |
| Product Support: support@chickensys.com           |
| Sampler Q+A:     qa@chickensys.com                |
| Web Page:        www.chickensys.com               |
* * * * * * * * * * * * * * * * * * * * * * * * * * *


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>
  • Re: Encodings, Trademarks, Files, and POSIX, Rubber Chicken Software Co. <=