If you look at my reply to David you'll see that I went a step further and
also renamed it on the actual filesystem on the fly. All seems to be working
now.
BTW, I couldn't get barfs working. Every time I compile it complains "can't
find foo.so <= 0.1a". It sounds like there's a bug with it currently in
barfs's os.write too. All files written only contain "Hello World!"

AJ ONeal


On Mon, Jun 22, 2009 at 10:26 AM, Andrew McNabb <[email protected]> wrote:

> On Sun, Jun 21, 2009 at 07:28:19PM -0600, AJ ONeal wrote:
> > I'd like to know of a batch method of renaming files on the filesystem to
> > utf8 and replacing any non-converting characters to '_'.
>
> If it "barfs", you could rename it in your Python script.  When you call
> encode, give it errors='replace'.  Then you can replace any u'\ufffd'
> (REPLACEMENT CHARACTER) with an '_'.
>
> Does that help?
>
> --
> Andrew McNabb
> http://www.mcnabbs.org/andrew/
> PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
> --------------------
> BYU Unix Users Group
> http://uug.byu.edu/
>
> The opinions expressed in this message are the responsibility of their
> author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
> ___________________________________________________________________
> List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
>
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to