mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
9ff4dc4258
commit
df4f08862e
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user