The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit df4f08862e6827017664c4a56e7e251d03f80400
Author: Georg Baum <[email protected]>
Date:   Mon Mar 4 19:48:26 2013 +0100

    Remove confusing warning
    
    I added it because of a misunderstanding. If the encoding is really set too
    late, to_utf8() in the Token constructor would probably fail, but a 
non-empty
    putback buffer is no problem, since it was always created via to_utf8() ->
    from_utf8().

diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp
index d0954cf..1f9ae6c 100644
--- a/src/tex2lyx/Parser.cpp
+++ b/src/tex2lyx/Parser.cpp
@@ -118,14 +118,9 @@ void debugToken(std::ostream & os, Token const & t, 
unsigned int flags)
 // Wrapper
 //
 
-bool iparserdocstream::setEncoding(std::string const & e)
+void iparserdocstream::setEncoding(std::string const & e)
 {
        is_ << lyx::setEncoding(e);
-       if (s_.empty())
-               return true;
-       cerr << "Setting encoding " << e << " too late. The encoding of `"
-            << to_utf8(s_) << "´ is wrong." << std::endl;
-       return false;
 }
 
 
@@ -266,7 +261,8 @@ bool Parser::setEncoding(std::string const & e)
 {
        //cerr << "setting encoding to " << e << std::endl;
        encoding_iconv_ = e;
-       return is_.setEncoding(e);
+       is_.setEncoding(e);
+       return true;
 }
 
 
diff --git a/src/tex2lyx/Parser.h b/src/tex2lyx/Parser.h
index 28d5017..89a2d1f 100644
--- a/src/tex2lyx/Parser.h
+++ b/src/tex2lyx/Parser.h
@@ -129,7 +129,7 @@ public:
        operator bool() const { return s_.empty() ? is_ : true; }
 
        /// change the encoding of the input stream to \p e (iconv name)
-       bool setEncoding(std::string const & e);
+       void setEncoding(std::string const & e);
 
        // add to the list of characters to read before actually reading
        // the stream

-----------------------------------------------------------------------

Summary of changes:
 src/tex2lyx/Parser.cpp |   10 +++-------
 src/tex2lyx/Parser.h   |    2 +-
 2 files changed, 4 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to