realbasic-nug
[Top] [All Lists]

Encodings, Trademarks, Files, and POSIX

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Encodings, Trademarks, Files, and POSIX
From: "Rubber Chicken Software Co." <support@chickensys.com>
Date: Thu, 30 Apr 2009 15:32:59 -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=QERdgGhAwLIR7s9p0auM4PJgGJAsHXYiqYnmeMf4Hyc5leWivMwJuha5iJVEGqrj/Pbppp9oZsqWT3Br785+PqVz/pRa3+G2tDjrMyMyvI5WKCCu/eTKWSGPsvK7Ybty;
Domainkey-status: unknown
In-reply-to: <1iyzxxl.1a86lsfrb63cuM%realbasiclists@monkeybreadsoftware. de>
References: <EFBD2814-7A6E-48B3-B747-ECBF3EF95BFA@oofile.com.au> <1iyzxxl.1a86lsfrb63cuM%realbasiclists@monkeybreadsoftware.de>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
OK, take a deep breath...

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?

Most of the time this works, but not in some cases. In this case I have a trademark symbol, and ultimately lstat() rejects the char* I throw at it.

Here's my process:

-I take the AbsolutePath of the folder item
-I convert that into a memoryblock
-I pass that pointer to the dylib as a char*
-That gets passed into lstat()
-lstat() returns -1, and checking it says the path does not exist\

The trademark symbol out of AbsolutePath gets a 3-byte listing 0xA284E2 (forgive my byte order). Apparently lstat() doesn't like that, but what DOES it like? I'll change to whatever lstat() likes, but what would you think it likes?

* * * * * * * * * * * * * * * * * * * * * * * * * * *
| 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>