realbasic-nug
[Top] [All Lists]

Re: FolderItem.DisplayName Encoding?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: FolderItem.DisplayName Encoding?
From: Totte Alm <totte at code66 dot se>
Date: Fri, 30 Sep 2005 16:59:38 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <S dot 0000672091 at mail dot tempel dot org> <p06230901bf62730bb8fc at [192 dot 168 dot 2 dot 55]> <C65F1AC6-31A4-11DA-8AA1-000393C6C4C4 at hit dot net> <6B696481-2EEC-46DF-A648-EEF9D8A3AEB0 at adx-online dot com> <FEF336E4-31BA-11DA-8AA1-000393C6C4C4 at hit dot net> <EF672859-2763-4BA1-BFDF-91CB94EAC1BD at adx-online dot com> <F622BE78-FB68-4FD4-BDED-1BE9FCF31290 at code66 dot se> <a06200706bf62fdabbf5e at [10 dot 0 dot 1 dot 4]>

30 sep 2005 kl. 16.38 skrev Joseph J. Strout:

At 4:25 PM +0200 9/30/05, Totte Alm wrote:


RB2005-r3 on Mac OS X 10.4.2

I do this
  // Grab filename
  SoftwareNameEdit.Text=f.DisplayName

It works for non accented characters, but the filename "Portfölj" ends up in the editfleld as "Portfo?lj",


Really? That's odd; it works fine for me (though I'm on OS 10.3.9). I threw a button and an EditField on a window, and put this in the button's Action event:

  Dim f As FolderItem
  f = GetOpenFolderItem("????")
  if f <> nil then EditField1.Text = f.DisplayName

This same code, in a new project, doesn't work for you?
It does ;-)
I had the code in a DropObject Handler, which trigged something completly different after the filename was set. Ripping the code out to a separate project showed that it do work, so then I ripped out alot of code, and found the nasty one that did change it (through a trip back and forth to a database server ). The problem with giga bit ethernet and G5s, you never realize you been on a server with your code.


Sorry for the noice.

// Totte




I've tired to use define encoding both as UTF16 and UTF8, no luck.


No, you shouldn't use DefineEncoding on a string like this, since REALbasic already knows its encoding. At least, in theory. I suppose you could try MacRoman to see if, for some weird reason, the data is actaully in MacRoman though REALbasic thinks it's UTF-8.

Could this file be on some odd file system?

Best,
- Joe

--
Joe Strout                          REAL Software, Inc.

Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
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>


------------------------------------------------------------------------ --------------------------
!YET the successor of .NET


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