Ü on the mac


#1

FileSearchPath::findChildFiles() doesn’t seem to be working if the filename has a ü.

OwnedArray<File> results;
FileSearchPath fsp(T("/Users/rrabien/Documents/Tsamples"));
fsp.findChildFiles(results,false,false,T("*"));
		
for (int i = 0; i < results.size(); i++)
	Logger::outputDebugString(results[i]->getFullPathName());

The above code illustrates the problem using juce 1.37 on Mac OS X 10.4 PPC.

Expected output: /Users/rrabien/Documents/Tsamples/0 Fünky.wav
Actual output: /Users/rrabien/Documents/Tsamples/0 Fu

The actual output is not folowed by a newline as expected. Also, using the string can crash a juce app.


#2

Ok, I tried this, and in fact it’s just the outputDebugString that’s not printing extended characters properly - internally the files are stored just fine.

It’s easy to sort out by tweaking juce_mac_SystemStats.cpp:

void Logger::outputDebugString (const String& text) { printf ((const char*) (text + T("\n")).toUTF8()); }


#3

Hmm… my bug must be somewhere else then.

Do you know how to use XCode/gdb to see the contents of a String?


#4

[quote=“G-Mon”]Hmm… my bug must be somewhere else then.

Do you know how to use XCode/gdb to see the contents of a String?[/quote]

I think the easiest way is to “view memory” on the text->text member.


#5