From 094535c010320967639e8e86f974d878e80baa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 1 May 2015 16:13:57 +0200 Subject: Imported Upstream version 1.7.0 --- spectro/aglob.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'spectro/aglob.c') diff --git a/spectro/aglob.c b/spectro/aglob.c index 8d4c846..e700f76 100644 --- a/spectro/aglob.c +++ b/spectro/aglob.c @@ -53,6 +53,31 @@ #include "numsup.h" #include "aglob.h" +/* + For MSWin should convert spath to UTF16 and call + wide version of FindFirstFileW with "\\?\" pre-pended to + the path. Convert results back to UTF8. (No Nt2K support ?) + + Will setting codepage 65001 work OK for this ? (Aparently not). + _setmbcp(65001) + + _wfindfirst() + _wfindnext() + _wfopen() + WideCharToMultiByte + MultiByteToWideCharTo + GetShortPathNameW to convert for libraries, but not 100% reliable + + See + + + + + _setmode + _O_U8TEXT on files to output UTF8 ? + fopen(&fp, "newfile.txt", "rt+, ccs=UTF-8"); + + */ + /* Create the aglob */ /* Return nz on malloc error */ int aglob_create(aglob *g, char *spath) { -- cgit v1.2.3