aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/unutf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/unutf.c')
-rw-r--r--src/cmd/unutf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cmd/unutf.c b/src/cmd/unutf.c
new file mode 100644
index 00000000..c1617315
--- /dev/null
+++ b/src/cmd/unutf.c
@@ -0,0 +1,16 @@
+#include <u.h>
+#include <libc.h>
+#include <bio.h>
+
+Biobuf bin;
+
+void
+main(void)
+{
+ int c;
+
+ Binit(&bin, 0, OREAD);
+ while((c = Bgetrune(&bin)) >= 0)
+ print("0x%ux\n", c);
+ exits(0);
+}