Japanese name for FileMaker again
Japanese name for FileMaker again
- Subject: Japanese name for FileMaker again
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 31 Mar 2003 16:25:46 -0500
I'm back, because my original analysis of the problem was apparently wrong.
It now looks like there's something wrong with NSWorkspace's
launchedApplications method, or its documentation, or my understanding of
it. I'm thinking that the path I find in the dictionary returned by
launchedApplications is not in the right encoding for the file system in
Japan, even though the program is running in Japan. Am I supposed to convert
it to the correct encoding myself, by calling something like NSString's
fileSystemRepresentation: to get the path as a C string and then something
else to convert it back to an NSString?
1. My Japanese localizer still sees the Japanese name of the "FileMaker"
portion of "FileMaker Pro" in unreadable Chinese characters. This happens
only when I obtain the file name by applying NSFileManager's
displayNameAtPath: method to the path returned by NSWorkspace's
launchedApplications method (using the NSApplicationPath key to get the full
path from the dictionary). Furthermore, the path with the "true" file name
(the file name before displayNameAtPath: is applied to it) doesn't work when
I use it to get other information about FileMaker using another API. Yet I
know the path is correct in some sense, because the "Pro" portion of the
file name (which is always in English in FileMaker's Japanese edition) is
visible in the garbled file name obtained from displayNameAtPath:.
2. When, instead, I get the file name by using Carbon (Core Foundation?)
techniques based on the process serial number and FSRefMakePath to get the
path as a C string, then apply NSFileManager's
stringWithFileSystemRepresentation: method to get the localized path, the
name comes out correctly with Japanese characters, and the path works with
all APIs.
3. Oddly, the first technique (using launchedApplications) does work
correctly when my localizer uses the Finder to rename FileMaker and every
directory in its path to English, then runs my application.
Point 3 suggests to me that the dictionary returned by launchedApplications
contains a path that is not using the correct encoding for the file system.
Is this possible? What am I supposed to do to make my application, which
works correctly in the U.S., also work correctly in Japan?
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.