# BBC BASIC Programmers' Reference

### Site Tools

listing_20the_20contents_20of_20a_20directory_20_28unicode_29

# Differences

This shows you the differences between two versions of the page.

 listing_20the_20contents_20of_20a_20directory_20_28unicode_29 [2018/03/31 13:19]127.0.0.1 external edit listing_20the_20contents_20of_20a_20directory_20_28unicode_29 [2018/04/17 16:57] (current)tbest3112 Added syntax highlighting 2018/04/17 16:57 tbest3112 Added syntax highlighting2018/03/31 13:19 external edit 2018/04/17 16:57 tbest3112 Added syntax highlighting2018/03/31 13:19 external edit Line 2: Line 2: //by Richard Russell, September 2014//\\ \\ **See also [[/​Listing%20the%20contents%20of%20a%20directory|Listing the contents of a directory]]**\\ \\  The main help documentation contains the routine **PROClistdirectory** which lists all the files in the current directory, but it only returns ANSI filenames. If a file or directory contains a non-ANSI character (e.g. from a different alphabet) it will be returned as a question mark. If you want to see these names with their true characters you can use the routine listed below. This returns the file and directory names as UTF-8 strings. Note that you will need to select a font which contains the required characters.\\ \\ //by Richard Russell, September 2014//\\ \\ **See also [[/​Listing%20the%20contents%20of%20a%20directory|Listing the contents of a directory]]**\\ \\  The main help documentation contains the routine **PROClistdirectory** which lists all the files in the current directory, but it only returns ANSI filenames. If a file or directory contains a non-ANSI character (e.g. from a different alphabet) it will be returned as a question mark. If you want to see these names with their true characters you can use the routine listed below. This returns the file and directory names as UTF-8 strings. Note that you will need to select a font which contains the required characters.\\ \\ + CP_UTF8 = &FDE9 CP_UTF8 = &FDE9 VDU 23,​22,​640;​512;​8,​16,​16,​128+8 : REM Select UTF-8 mode VDU 23,​22,​640;​512;​8,​16,​16,​128+8 : REM Select UTF-8 mode Line 21: Line 22: ENDIF ENDIF ENDPROC ​ ENDPROC ​ +