Boost logo

Boost Users :

Subject: [Boost-users] [Q] UTF-8 support help
From: V S P (toreason_at_[hidden])
Date: 2009-03-17 19:43:37


Hello,
I am reading data from postgresql via ODBC encoded in UTF-8.

I am trying to verify that I am indeed reading the right data (I
do not need to manipulate).

Simple output, of course does not work and Visual Studio '08
debugger just shows question marks.

So I wanted to try and convert to double byte using Boost UTF8
facets but I am simply lost at how to do this.
It appears that I cannot include any header files. There is a
reference to it in serialization pages, but not
clear how to include / use it

namespace fs = boost::filesystem;

  std::locale global_loc = std::locale();
  std::locale loc( global_loc, new fs::detail::utf8_codecvt_facet
);
  fs::wpath_traits::imbue( loc );

But this does not work in 'User' files because unless you are a
boost library the
detail::utf8_codecvt_facet

is not available.

So my question is, is there a way to use boost to either printout
to a file UTF8 or to convert it to UTF-16 and see
it may be in the debugger?

thanks in advance

-- 
  V S P
  toreason_at_[hidden]
-- 
http://www.fastmail.fm - Send your email first class



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