]> git.lyx.org Git - lyx.git/blobdiff - src/author.C
add config.h
[lyx.git] / src / author.C
index fed15aef27ef79842f5d0c31409761443f07584e..ea05ccd83d53dda7c494f6b814a1a1c09945dfb9 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;
 
 
 bool operator==(Author const & l, Author const & r)
@@ -30,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;
 }
 
@@ -38,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;
 }
 
@@ -91,3 +98,6 @@ AuthorList::Authors::const_iterator AuthorList::end() const
 {
        return authors_.end();
 }
+
+
+} // namespace lyx