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().
This commit is contained in:
Georg Baum 2013-03-04 19:48:26 +01:00
parent 9ff4dc4258
commit df4f08862e
2 changed files with 4 additions and 8 deletions

View File

@ -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;
}

View File

@ -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