DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th October 2008
IIMarckus IIMarckus is offline
Port Guard
 
Join Date: Aug 2008
Posts: 13
Thanked 0 Times in 0 Posts
Default cat and UTF-8

EDIT: A simple "man -k unicode" brought up uxterm. Soz for the useless thread guys

I use UTF-8 text files a lot, generally with a byte-order mark. When I use cat, tail, more, or less to display these files, I get a lot of mojibake. For instance, here's what happens with a file that consists of a byte-order mark and two characters (a©):
Code:
$ file utf8.txt
utf8.txt: UTF-8 Unicode text, with no line terminators
$ hexdump utf8.txt
00000000 bbef 61bf a9c2
00000006
$ cat utf8.txt
ḯ»¿a©
$ more utf8.txt
ḯ»¿a©
$ tail utf8.txt
ḯ»¿a©$ 
Is this a problem with the programs themselves, or is it the shell, or Eterm? Is there a way (by changing settings or by installing programs) that I can make this display correctly?

Last edited by IIMarckus; 15th October 2008 at 03:51 AM.
Reply With Quote
  #2   (View Single Post)  
Old 15th October 2008
corey_james corey_james is offline
Uber Geek
 
Join Date: Apr 2008
Location: Brisbane, Australia
Posts: 238
Thanked 4 Times in 10 Posts
Default

uxterm - that's good to know
__________________
"No, that's wrong, Cartman. But don't worry, there are no stupid answers, just stupid people." -- Mr. Garrison

Forum Netiquette
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick