[liblouis-liblouisxml] Re: File path encoding

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 5 Aug 2013 17:41:35 -0500

That sounds like the right approach.

John

On Mon, Aug 05, 2013 at 07:25:25PM +0100, Michael Whapples wrote:
> My main difficulty is that in python I may get the filename as a unicode 
> string, thus I need to encode it to a byte array, how to choose which 
> encoding?
> 
> I guess may be use the encoding returned by:
> sys.getfilesystemencoding()
> 
> Michael Whapples
> On 05/08/2013 18:51, John J. Boyer wrote:
> >Any file name that your platform supports should be ok. If there are
> >problems let me know.
> >
> >John
> >
> >On Mon, Aug 05, 2013 at 06:41:12PM +0100, Michael Whapples wrote:
> >>While a bit contrived, still a valid path (at least on my system with a
> >>NTFS filesystem):
> >>d:\prices£
> >>
> >>More realistic examples might be found in non-English speaking nations
> >>where accented characters are used.
> >>
> >>It does require the filesystem to support the file name encoding.
> >>
> >>Michael Whapples
> >>On 05/08/2013 15:27, John J. Boyer wrote:
> >>>Can you give an example of a file name which is not asciikj?
> >>>
> >>>Thanks,
> >>>John
> >>>
> >>>On Mon, Aug 05, 2013 at 02:10:20PM +0100, Michael Whapples wrote:
> >>>>Hello,
> >>>>In calls such as lou_setDataPath, lbu_translateString (the
> >>>>configFileList argument), etc, what encoding should be used for the file
> >>>>paths?
> >>>>
> >>>>At the moment in my liblouisutdml python bindings I am using ascii
> >>>>encoding, but this will not allow certain characters in the file names.
> >>>>
> >>>>Michael Whapples
> >>>>For a description of the software, to download it and links to
> >>>>project pages go to http://www.abilitiessoft.com
> >>For a description of the software, to download it and links to
> >>project pages go to http://www.abilitiessoft.com
> 
> For a description of the software, to download it and links to
> project pages go to http://www.abilitiessoft.com

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: