aboutsummaryrefslogtreecommitdiff
path: root/examples/test_unicode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/test_unicode.cpp')
-rw-r--r--examples/test_unicode.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/test_unicode.cpp b/examples/test_unicode.cpp
new file mode 100644
index 0000000..ea916b1
--- /dev/null
+++ b/examples/test_unicode.cpp
@@ -0,0 +1,31 @@
+// $Id: test_unicode.cpp,v 1.8 2002/06/29 17:26:18 t1mpy Exp $
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "id3/id3lib_streams.h"
+#include <id3/tag.h>
+
+int main( int argc, char *argv[])
+{
+ ID3_Tag tag;
+ ID3_Frame frame;
+
+ tag.Link("test-230-unicode.tag");
+ tag.Strip(ID3TT_ALL);
+ tag.Clear();
+
+ frame.SetID(ID3FID_USERTEXT);
+ frame.GetField(ID3FN_DESCRIPTION)->Set("example text frame");
+ frame.GetField(ID3FN_TEXT)->Set("This text and the description should be in Unicode.");
+ frame.GetField(ID3FN_TEXTENC)->Set(ID3TE_UNICODE);
+ tag.AddFrame(frame);
+
+ tag.SetPadding(false);
+ tag.SetUnsync(false);
+ tag.Update(ID3TT_ID3V2);
+
+ return 0;
+}
+