Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2011-01-18 23:53:20 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2011-01-18 23:53:20 +0300
commit7d675b15fb3ead4d10f1a2abd7eb39c2e5d8068c (patch)
treee31424faeb381ad4bcb58b7eab94496693e7b2f4 /intern
parent083be9023271ad057365917bf289e10d6524a9fc (diff)
Fix [#25678]: (Ghost Cocoa) Fix character encoding translation for filenames (open & window title display)
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm4
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm4
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 08d83565e5c..bf401138cf1 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1356,7 +1356,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
if (confirmOpen == NSAlertAlternateReturn)
{
- filenameTextSize = [filepath lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
+ filenameTextSize = [filepath lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
temp_buff = (char*) malloc(filenameTextSize+1);
@@ -1364,7 +1364,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
return GHOST_kFailure;
}
- strncpy(temp_buff, [filepath cStringUsingEncoding:NSISOLatin1StringEncoding], filenameTextSize);
+ strncpy(temp_buff, [filepath cStringUsingEncoding:NSUTF8StringEncoding], filenameTextSize);
temp_buff[filenameTextSize] = '\0';
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index db08f238045..8d28c9d5b17 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -498,7 +498,7 @@ void GHOST_WindowCocoa::setTitle(const STR_String& title)
GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setTitle(): window invalid")
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSString *windowTitle = [[NSString alloc] initWithCString:title encoding:NSISOLatin1StringEncoding];
+ NSString *windowTitle = [[NSString alloc] initWithCString:title encoding:NSUTF8StringEncoding];
//Set associated file if applicable
if (windowTitle && [windowTitle hasPrefix:@"Blender"])
@@ -517,7 +517,7 @@ void GHOST_WindowCocoa::setTitle(const STR_String& title)
[m_window setTitle:[associatedFileName lastPathComponent]];
//Blender used file open/save functions converte file names into legal URL ones
- associatedFileName = [associatedFileName stringByAddingPercentEscapesUsingEncoding:NSISOLatin1StringEncoding];
+ associatedFileName = [associatedFileName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
@try {
[m_window setRepresentedFilename:associatedFileName];
}