Go Back   DaemonForums > OpenBSD > OpenBSD General

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

Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th September 2009
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
Join Date: Apr 2008
Location: Indonesia
Posts: 2,236
Default iconv and OpenBSD

I'm having some problems with utf-8 on OpenBSD ...

More specifically, iconv does't seem to work very well. My WM (PekWM) sets the Window title to <INVALID> whenever it contains a non-ascii character (This includes all GIMP windows and many webpages have UTF-8 <title>'s as well), some investigation discovered that PekWM uses iconv() for character translation.

A quick test with % iconv -t UTF-8 file where file is a file with non-ascii characters seems to confirm that iconv doesn't work at all on OpenBSD ... Or at least not with utf-8.

% iconv -l displays UTF-8 as a supported character set, so it should work. (tm)

(Also having problems with UTF-8 with mutt, may be related ... Some other apps like Vim and Xterm work fine though).
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #2   (View Single Post)  
Old 12th September 2009
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 136

Could be because iconv defaults to the locale for -f and -t, and OpenBSD only supports the C locale.
$ file test.txt                                        
test.txt: ISO-8859 English text, with CRLF line terminators
$ iconv -t UTF-8 -f CP1252 test.txt > test8.txt
$ file test8.txt 
test8.txt: UTF-8 Unicode English text, with CRLF line terminators
As for mutt, I have set charset=utf-8 in my muttrc, and characters like é look fine in a UTF8 xterm.
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote

iconv, utf-8

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 and Iconv disi NetBSD Installation and Upgrading 1 13th May 2008 09:07 PM

All times are GMT. The time now is 09:37 PM.

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