summaryrefslogtreecommitdiff
path: root/spectro/aglob.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-01 16:13:57 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-01 16:13:57 +0200
commit094535c010320967639e8e86f974d878e80baa72 (patch)
treeefc3094b20355dcbeebb2c4ece4fcfc69bffedb5 /spectro/aglob.c
parentc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (diff)
Imported Upstream version 1.7.0upstream/1.7.0
Diffstat (limited to 'spectro/aglob.c')
-rw-r--r--spectro/aglob.c25
1 files changed, 25 insertions, 0 deletions
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 <http://utf8everywhere.org/>
+ <http://www.nubaria.com/en/blog/?p=289>
+ <http://stackoverflow.com/questions/166503/utf-8-in-windows>
+ <http://alfps.wordpress.com/2011/11/22/unicode-part-1-windows-console-io-approaches/>
+
+ _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) {