Hi,
if I have a nib with a NSTextField I start the dialog and type e.g. German umlauts or Japanese etc. the STDOUT output is a '\U####' sequence.
{ignCase = 1; regExp = 1; searchString = "\U00f6\U00e4\U00fc
\U00blabla"; }
Would it be possible to output the content à la
NSFileHandle *fh = [NSFileHandle fileHandleWithStandardOutput]; if (fh) { [fh writeData:[output dataUsingEncoding:NSUTF8StringEncoding]]; }
?? Or are there any disadvantages with that?
Best,
Hans
On 30. Oct 2006, at 13:30, Hans-Joerg Bibiko wrote:
[...] Would it be possible to output the content à la
I will switch to the XML property list format (as output) -- I used the current because it’s more readable and compact, thus easier for testing etc.
But unfortunately it is not very robust (it can do UTF-8, the system just has no way to write it).
[...] Would it be possible to output the content à la
I will switch to the XML property list format (as output) -- I used the current because it's more readable and compact, thus easier for testing etc.
Well, by my opinion it would be nice to have both output formats (in UTF-8).
The xml property list is perfect, but if you want to write a short bash script with a tm_dialog it could be a bit elaborate.
Best,
Hans
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On 31. Oct 2006, at 00:43, Hans-Joerg Bibiko wrote:
[...] Would it be possible to output the content à la
I will switch to the XML property list format (as output) -- I used the current because it's more readable and compact, thus easier for testing etc.
Well, by my opinion it would be nice to have both output formats (in UTF-8).
The xml property list is perfect, but if you want to write a short bash script with a tm_dialog it could be a bit elaborate.
The problem is that the old-style ASCII format is only supported for reading by the OS. The old output came from calling ‘description’ on the dictionary, which gives something almost but not exactly like the old-style format.
So I would need to embed my own pretty-printer if it should be supported.
I should also add that technically the old-style format does not support dates, booleans, and integers, these are all converted to strings, which is not ideal.
For the simple case, an option is to pipe the output through ‘pl’, though you will get the problem with non-ASCII, you can use ‘__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pl’, which will still use \Unnnn, but at least it will be correct, e.g.:
echo '{ foo = "æblegrød"; }'| \ __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pl {foo = "\U00e6blegr\U00f8d"; }
And for the records, if you do not set the user encoding:
echo '{ foo = "æblegrød"; }'| \ pl {foo = "\U221a\U00b6blegr\U221a\U220fd"; }
What we could maybe do was a bash function which parsed the tm_dialog result and exported the values as environment values / bash arrays or similar. I can see how the XML output basically makes it infeasible to use tm_dialog from a shell script w/o using a scripting language with an XML/plist parser.
Hey Allen (et all)
I just finished watching your Text Manipulation screencast and noticed you were using the ^+cmd+T menu to show us the key bindings for specific commands. As an alternative to keeping this menu open, might I suggest having KeyCastr (http://stephendeken.net/software/keycastr/) running in the background so that we can see your keyboard shortcuts as you type them. It blinks up a smoke-bezelled growl-like notification of the keyboard shortcuts you typed; might be more handier than having to hit the menu items to show us what you did on the keyboard.
Just a thought, === ~Adam
On 31. Oct 2006, at 01:46, Adam French wrote:
I just finished watching your Text Manipulation screencast and noticed you were using the ^+cmd+T menu to show us the key bindings for specific commands. As an alternative to keeping this menu open, might I suggest having KeyCastr (http://stephendeken.net/software/keycastr/) running in the background so that we can see your keyboard shortcuts as you type them. It blinks up a smoke-bezelled growl-like notification of the keyboard shortcuts you typed; might be more handier than having to hit the menu items to show us what you did on the keyboard.
I have actually been corresponding with the author to make it usable for my screencasting purposes :) Saying out loud all those key equivalents is quite tedious, and I do say control instead of command a few times ;)
On 31 Oct 2006, at 00:52, Allan Odgaard wrote:
On 31. Oct 2006, at 01:46, Adam French wrote:
I just finished watching your Text Manipulation screencast and noticed you were using the ^+cmd+T menu to show us the key bindings for specific commands. As an alternative to keeping this menu open, might I suggest having KeyCastr (http://stephendeken.net/software/keycastr/) running in the background so that we can see your keyboard shortcuts as you type them. It blinks up a smoke-bezelled growl- like notification of the keyboard shortcuts you typed; might be more handier than having to hit the menu items to show us what you did on the keyboard.
I have actually been corresponding with the author to make it usable for my screencasting purposes :) Saying out loud all those key equivalents is quite tedious, and I do say control instead of command a few times ;)
Mouspose 2 also has this functionality.[1] It is not free though.