#746 Rexx error if umlauts in file/dir-names

v4.0beta
closed
Rick McGuire
None
5
2012-08-14
2009-06-30
No

Unfortunately, https://sourceforge.net/tracker/?func=detail&aid=2814767&group_id=119701&atid=684730 has been closed already, such that I had to open a new artefact to follow up.

Enclosed you'll find a zip-archive that unzips a directory structure, where some directories contain an umlaut.

There is a file named "dir.txt" that contains the output of a "dir . /s" on a German Windows XP SP 3 system.

This file gets processed by a simple Rexx script which extracts the fully qualified directory name and then uses the directory()-BIF to change into the just extracted subdirectory.

As can be seen by the enclosed Rexx program, this does not work for subdirectory names that contain high-ASCII characters (i.e. German umlauts in this case).

Developed and tested with a fresh build of ooRexx (ooRexx400_4859-x86_32-debug.exe) on Windows XP SP 3, CP 850 in a command line window.

Discussion

  • Rick McGuire
    Rick McGuire
    2009-06-30

    This is a case of garbage-in/garbage out. The output written to stdout has obviously been translated into a different code page which results in an invalid directory name when read from the file and used in the APIs. This results in an invalid name getting sent into the Windows APIs for changing the directory, with the expected bad results. These directories are perfectly accessible if accessed using names obtained via APIs rather than via redirected terminal I/O. For example, SysFileTree and directory works perfectly fine with each of these directories.

     


Anonymous


Cancel   Add attachments