mirror of
https://github.com/taglib/taglib.git
synced 2026-02-13 11:43:06 -05:00
tagreader: Fix displaying of seconds in length, UTF-8 for ostream
The padding was wrong, 8 seconds were displayed as 0:80 instead of 0:08. Also make the output of tagreader and tagreader_c the same, including the encoding, which was still ISO-8859-1 for std::ostream.
This commit is contained in:
@ -706,6 +706,6 @@ TagLib::String operator+(const TagLib::String &s1, const char *s2)
|
||||
|
||||
std::ostream &operator<<(std::ostream &s, const TagLib::String &str)
|
||||
{
|
||||
s << str.to8Bit();
|
||||
s << str.to8Bit(true);
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ public:
|
||||
void operator()(const TagLib::String &v)
|
||||
{
|
||||
s << '"';
|
||||
for (char c : v.to8Bit()) {
|
||||
for (char c : v.to8Bit(true)) {
|
||||
if(c == '"') {
|
||||
s << "\\\"";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user