Boost logo

Boost Users :

Subject: Re: [Boost-users] [locale] Quick questions
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2011-11-07 14:44:16


--- On Mon, 11/7/11, Lars Viklund <zao_at_[hidden]> wrote:

> From: Lars Viklund <zao_at_[hidden]>
> Subject: Re: [Boost-users] [locale] Quick questions
> To: boost-users_at_[hidden]
> Date: Monday, November 7, 2011, 8:07 PM
> On Mon, Nov 07, 2011 at 02:35:09AM
> -0800, Artyom Beilis wrote:
> > > From: Jookia <166291_at_[hidden]>
> > <
> > > Hey! I have some small questions about
> Boost.Locale.
> > >
> > > 1. Is it safe to assume that Boost.Locale API
> methods (like gettext) return
> > > UTF-8 strings, or are they locale dependent?
> > >
> >
> > No encoding is locale dependent however UTF-8 is OS
> default on all
> > modern systems.
>
> Artyom: Please confirm whether you consider Windows a
> "modern system"
> here,

Actually under Windows it is explicitly UTF-8 by default:

   http://beta.boost.org/doc/libs/1_48_0_beta1/libs/locale/doc/html/default_encoding_under_windows.html

Also it can be overridden by enviroment variable like LANG even
on Windows (however it is not in use by default on this OS)

On other systems (POSIX systems) like Linux, FreeBSD, Solaris,
Darwin it may not be UTF-8 as well.

However the default encoding on recent versions of these operating
systems is UTF-8 and non-Unicode encodings are quite deprecated.

So if the question whether it is likely to be UTF-8 then yes, if it
may be not-UTF-8 then yes as well.

> or if this is more of your subtle crusade against one
> of the major
> platforms.
>

No it is not crusade against Windows.

And Windows is modern (even thou crappy) operating system.

Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.sf.net/
CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net