[vlc-commits] Win32: define FromT/ToT to convert between UTF-8 and TCHAR
Rémi Denis-Courmont
git at videolan.org
Sat Jan 28 16:36:42 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 28 17:14:55 2012 +0200| [20d2928ec39a2fa4fa3f2aa7af70eff16d58fc2c] | committer: Rémi Denis-Courmont
Win32: define FromT/ToT to convert between UTF-8 and TCHAR
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=20d2928ec39a2fa4fa3f2aa7af70eff16d58fc2c
---
include/vlc_charset.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/vlc_charset.h b/include/vlc_charset.h
index ecf072d..13583d6 100644
--- a/include/vlc_charset.h
+++ b/include/vlc_charset.h
@@ -79,6 +79,14 @@ static inline wchar_t *ToWide (const char *utf8)
MultiByteToWideChar (CP_UTF8, 0, utf8, -1, out, len);
return out;
}
+
+# ifdef UNICODE
+# define FromT FromWide
+# define ToT ToWide
+# else
+# define FromT FromLocaleDup
+# define ToT ToLocaleDup
+# endif
#endif
/**
More information about the vlc-commits
mailing list