Unicode filenames

Bob van der Poel bob at mellowood.ca
Sat Dec 7 16:31:56 EST 2019


On Sat, Dec 7, 2019 at 12:47 PM DL Neil via Python-list <
python-list at python.org> wrote:

> On 8/12/19 5:50 AM, Bob van der Poel wrote:
> > On Sat, Dec 7, 2019 at 4:00 AM Barry Scott <barry at barrys-emacs.org>
> wrote:
> >>> On 6 Dec 2019, at 18:17, Bob van der Poel <bob at mellowood.ca> wrote:
> >>>
> >>> I have some files which came off the net with, I'm assuming, unicode
> >>> characters in the names. I have a very short program which takes the
> >>> filename and puts into an emacs buffer, and then lets me add
> information
> >> to
> >>> that new file (it's a poor man's DB).
> >>>
> >>> Next, I can look up text in the file and open the saved filename.
> >>> Everything works great until I hit those darn unicode filenames.
>
> ...
>
> >> Do you get the error with python 3?
> > I'm running this program on Linux (Ubuntu 19.10) and Python2.
>
> ...
>
> > I've taking the coward's way out and renamed the 1/2 dozen files. Seems
> > that it is when I grab a filename from the DB it is in unicode and the
> the
> > textAtCursor() and then I am trying to open that file using a fork to a
> > pdf-display program. This is all Q&D stuff so I'm going to file it under
> > "mysteries of life" and live with it :)
>
>
> Fair enough, for such small number no other solution could be as
> efficient! My quick-and-dirty 'solution' would only work for (very few)
> 'old data files' being recognised/name-updated using Python3.
>
>
> Insert here: obligatory warning about the deprecation of Python2 at the
> end of this month/year...
>
>
Yeah, heard all that before :) But, seriously, I wonder how many short
(less than 100 lines) programs there are out there written in py2 that will
not run in py3. Good thing py2 will still be available to be installed for
many, many years!


-- 

**** Listen to my FREE CD at http://www.mellowood.ca/music/cedars ****
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: bob at mellowood.ca
WWW:   http://www.mellowood.ca


More information about the Python-list mailing list