realbasic-plugins
[Top] [All Lists]

Re: How to make folderitem from UTF16 path string on Windows?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: How to make folderitem from UTF16 path string on Windows?
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Mon, 28 Feb 2005 12:59:06 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <1gsp1wk dot 1vcw99x11tqyanM%support at monkeybreadsoftware dot de>
I imagine it is because most Windows File system calls require a NULL terminated string. Which is not the case on Mac for example.

On 28.2.2005, at 11:46, Christian Schmitz wrote:

William Yu <william at realsoftware dot com> wrote:

One thing that should be pointed out is that when you build your string, you should also copy an extra null byte (this only applies to UTF16 strings).

Is there a logical reason for this?

I copy an extra byte now and the problem is solved, except that
len(s)=lenb(s)*2+1 now which I'm not sure may make trouble.

PS: Only on Windows, this is necessary, or?

Mfg
Christian

--
Nine thousand functions in one REALbasic plug-in. The MBS Plugin.
<http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>