]> git.lyx.org Git - lyx.git/blobdiff - src/author.C
Scons: update_po should now work (missing dependency though)
[lyx.git] / src / author.C
index a81b67325c66523f67643cb055bc69a644dedc0b..5eba4383183e50f3203cff3f16fc819fb219dd11 100644 (file)
 
 #include "support/std_istream.h"
 
-using lyx::support::token;
-using lyx::support::trim;
+
+namespace lyx {
+
+using support::token;
+using support::trim;
 
 using std::string;
 
@@ -32,7 +35,8 @@ bool operator==(Author const & l, Author const & r)
 
 std::ostream & operator<<(std::ostream & os, Author const & a)
 {
-       os << "\"" << a.name() << "\" " << a.email();
+       // FIXME UNICODE
+       os << "\"" << to_utf8(a.name()) << "\" " << to_utf8(a.email());
        return os;
 }
 
@@ -40,8 +44,9 @@ std::istream & operator>>(std::istream & is, Author & a)
 {
        string s;
        getline(is, s);
-       a.name_ = trim(token(s, '\"', 1));
-       a.email_ = trim(token(s, '\"', 2));
+       // FIXME UNICODE
+       a.name_ = from_utf8(trim(token(s, '\"', 1)));
+       a.email_ = from_utf8(trim(token(s, '\"', 2)));
        return is;
 }
 
@@ -75,7 +80,7 @@ void AuthorList::record(int id, Author const & a)
 }
 
 
-Author const & AuthorList::get(int id)
+Author const & AuthorList::get(int id) const
 {
        Authors::const_iterator it(authors_.find(id));
        BOOST_ASSERT(it != authors_.end());
@@ -93,3 +98,6 @@ AuthorList::Authors::const_iterator AuthorList::end() const
 {
        return authors_.end();
 }
+
+
+} // namespace lyx