On Fri, Nov 02, 2007 at 09:03:31PM +0100, Marc Espie wrote:
> On Fri, Nov 02, 2007 at 07:41:35AM -0400, Juan Miscaro wrote:
> > --- Paul Irofti <[EMAIL PROTECTED]> wrote:
> > > On Thu, Nov 01, 2007 at 11:22:53AM -0400, Nick Guenther wrote:
> > > > On 11/1/07, Juan Miscaro <[EMAIL PROTECTED]> wrote:
> > > > > Is there any priority for having OpenBSD support UTF8?
> > > > 
> > > > utf-8 isn't an OS-level thing. You need to do it in every app.
> > > > Googling, the first result brings up
> > > > http://osdir.com/ml/os.openbsd.ports/2004-02/msg00376.html as an
> > > > example.
> > > > 
> > > 
> > > The sad thing is that the man pages don't mention that OpenBSD's
> > > libc doesn't quite support locale, multibyte/wide char conversions
> > > thus Unicode.
> > > 
> > > E.g. if you look at mbstowcs(3) you'd say: okay, I can use that...
> > > but looking at the code behind it you'll see its a pure stab that
> > > does a simple memcpy from chars to ints (or wchar_ts as they
> > > modernly call it in C99).
> 
> You would REALLY be surprised how much of a difference this `simple
> stub' does... it allows us to compile *a lot* of code that helps
> support utf8 in ports land.
> 
> And in reality, this part of OpenBSD is C99-compliant. There's
> absolutely *nothing* in the standard that says you have to support any
> locale except the C locale (which we do).
> 
> If something has to be documented, it's probably that we just support
> 8 bit locales for now...
> 
> That said, this will eventually improve, and yes, this is a long road.
> If it was only the C library, it would be rather simple...
> 
> > 
> > To get back to the practical nature of my original request, if
> > someone can let me know how to write French characters in a terminal
> > (via an SSH connection) I would be very grateful.  I would like to
> > use a terminal emulator that uses UTF8 and I believe xterm does this
> > but I can't find an OpenBSD package (or port) for it.
> > 
> > // juan
> 
> The xterm in OpenBSD can do it. It supports the utf8 option.
> 
> You will need an editor that supports utf8 characters as well.  Both
> vim and emacs do.
> 
> There are lots of programs in ports that have fairly decent level of
> locale support. Heck, I can actually write japanese in OpenBSD, for
> instance, and that's a *whole lot* more complicated than just french
> characters.
> 

Would supporting UTF-8 in OpenBSD change the apparent speed at which it
runs on older hardware?  Debian Etch does UTF-8 by default and it crawls
on my P-II; they told me it was because of UTF-8 and locales support.  I
changed the locale to C and removed the locales support and it speeded
up dramatically.  That type of tweaking of a base install isn't as easy
in OpenBSD.

Doug.

Reply via email to