Prefer native tools since other users of my script won't necessarily have the proper toolset if it's not built-in.I will have already saved the temp txt file, as MacRoman, to disk using the built-in AppleScript routines. However, I cannot see how "sed" can easily convert the text encoding. I am thinking that forcing a text encoding conversion may help to eliminate all non-utf8 characters in the file. However, there are still many elements of the file that need to be cleaned up, characters that appear as garbage if the file is opened as utf-8 (e.g. I have found a tool called, "sed", which allows me to do the text parsing. A text file (sometimes spelled textfile an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text.A text file exists stored as data within a computer file system.In operating systems such as CP/M and MS-DOS, where the operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing. As such, I want to do my text parsing and conversion using the OS X command line. AppleScript is extremely slow when working with very large text blocks. ![]() I will be calling the utility from an AppleScript that I have created. I would like to call a command line utility in Mac OS X 10.8 that gives me the ability to convert a text file saved in standard Western Mac OS Roman encoding to the more generic UTF-8.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |