unicode_20filenames
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
unicode_20filenames [2018/03/31 13:19] – external edit 127.0.0.1 | unicode_20filenames [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
//by Richard Russell, October 2016//\\ \\ Although //BBC BASIC for Windows// includes limited support for Unicode (UTF-8) strings, this support does not extend to directory and file names. Even if you explicitly select UTF-8 as the character set in a [[http:// | //by Richard Russell, October 2016//\\ \\ Although //BBC BASIC for Windows// includes limited support for Unicode (UTF-8) strings, this support does not extend to directory and file names. Even if you explicitly select UTF-8 as the character set in a [[http:// | ||
==== OPENIN: ==== | ==== OPENIN: ==== | ||
+ | <code bb4w> | ||
DEF FNopeninUTF8(utf8$) | DEF FNopeninUTF8(utf8$) | ||
LOCAL A%, R%, S%, W% | LOCAL A%, R%, S%, W% | ||
Line 11: | Line 12: | ||
SYS " | SYS " | ||
= OPENIN($$A%) | = OPENIN($$A%) | ||
+ | </ | ||
\\ | \\ | ||
==== OPENUP: ==== | ==== OPENUP: ==== | ||
+ | <code bb4w> | ||
DEF FNopenupUTF8(utf8$) | DEF FNopenupUTF8(utf8$) | ||
LOCAL A%, R%, S%, W% | LOCAL A%, R%, S%, W% | ||
Line 21: | Line 24: | ||
SYS " | SYS " | ||
= OPENUP($$A%) | = OPENUP($$A%) | ||
+ | </ | ||
\\ | \\ | ||
==== *DELETE/ | ==== *DELETE/ | ||
+ | <code bb4w> | ||
DEF PROCdeleteUTF8(utf8$) | DEF PROCdeleteUTF8(utf8$) | ||
LOCAL W% | LOCAL W% | ||
Line 29: | Line 34: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
\\ | \\ | ||
==== *RENAME: ==== | ==== *RENAME: ==== | ||
+ | <code bb4w> | ||
DEF PROCrenameUTF8(old$, | DEF PROCrenameUTF8(old$, | ||
LOCAL O%, N% | LOCAL O%, N% | ||
Line 38: | Line 45: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
\\ | \\ | ||
==== *MKDIR: ==== | ==== *MKDIR: ==== | ||
+ | <code bb4w> | ||
DEF PROCmkdirUTF8(utf8$) | DEF PROCmkdirUTF8(utf8$) | ||
LOCAL W% | LOCAL W% | ||
Line 46: | Line 55: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
\\ | \\ | ||
==== *CHDIR: ==== | ==== *CHDIR: ==== | ||
+ | <code bb4w> | ||
DEF PROCchdirUTF8(utf8$) | DEF PROCchdirUTF8(utf8$) | ||
LOCAL W% | LOCAL W% | ||
Line 54: | Line 65: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
\\ | \\ | ||
==== *RMDIR: ==== | ==== *RMDIR: ==== | ||
+ | <code bb4w> | ||
DEF PROCrmdirUTF8(utf8$) | DEF PROCrmdirUTF8(utf8$) | ||
LOCAL W% | LOCAL W% | ||
Line 62: | Line 75: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
\\ Note that none of these routines generates an error if, for example, the specified file does not exist. If you require this functionality you can easily check the value returned from the relevant API function to check whether it was successful or not (generally a non-zero returned value will signify success and zero will signify failure). | \\ Note that none of these routines generates an error if, for example, the specified file does not exist. If you require this functionality you can easily check the value returned from the relevant API function to check whether it was successful or not (generally a non-zero returned value will signify success and zero will signify failure). |
unicode_20filenames.1522502387.txt.gz · Last modified: 2024/01/05 00:16 (external edit)