eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot/dic encoding.h


From: Olivier Teulière
Subject: [Eliot-dev] eliot/dic encoding.h
Date: Sat, 30 Jul 2011 19:47:25 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>       11/07/30 19:47:25

Modified files:
        dic            : encoding.h 

Log message:
        Defined some useful string conversion macros

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/dic/encoding.h?cvsroot=eliot&r1=1.7&r2=1.8

Patches:
Index: encoding.h
===================================================================
RCS file: /cvsroot/eliot/eliot/dic/encoding.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- encoding.h  30 Jul 2011 19:46:47 -0000      1.7
+++ encoding.h  30 Jul 2011 19:47:24 -0000      1.8
@@ -128,5 +128,19 @@
  */
 string writeInUTF8(const wstring &iWString, const string &iContext);
 
+
+// Useful macros
+
+// Convert between wstring and string
+#define wfl(s) convertToWc(s)
+#define lfw(s) convertToMb(s)
+// Convert between wstring and utf-8 string
+#define ufw(s) writeInUTF8((s), "ufw")
+#define wfu(s) readFromUTF8((s), "wfu")
+// Convert between string and utf-8 string
+#define ufl(s) ufw(wfl(s))
+#define lfu(s) lfw(wfu(s))
+
+
 #endif
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]