mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
* src/support/unicode.C
(IconvProcessor::convert): Fix hex output of bytes on systems where char is signed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16468 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d96c36e555
commit
bcbd895143
@ -150,10 +150,13 @@ int IconvProcessor::convert(char const * buf, size_t buflen,
|
|||||||
<< " has been encountered in the input.\n"
|
<< " has been encountered in the input.\n"
|
||||||
<< "When converting from " << fromcode_
|
<< "When converting from " << fromcode_
|
||||||
<< " to " << tocode_ << ".\n";
|
<< " to " << tocode_ << ".\n";
|
||||||
lyxerr << "Input: " << std::hex;
|
lyxerr << "Input:" << std::hex;
|
||||||
for (size_t i = 0; i < buflen; ++i) {
|
for (size_t i = 0; i < buflen; ++i) {
|
||||||
boost::uint32_t const b = buf[i];
|
// char may be signed, avoid output of
|
||||||
lyxerr << "0x" << b << " ";
|
// something like 0xffffffc2
|
||||||
|
boost::uint32_t const b =
|
||||||
|
*reinterpret_cast<unsigned char const *>(buf + i);
|
||||||
|
lyxerr << " 0x" << b;
|
||||||
}
|
}
|
||||||
lyxerr << endl;
|
lyxerr << endl;
|
||||||
break;
|
break;
|
||||||
@ -162,10 +165,13 @@ int IconvProcessor::convert(char const * buf, size_t buflen,
|
|||||||
<< " has been encountered in the input.\n"
|
<< " has been encountered in the input.\n"
|
||||||
<< "When converting from " << fromcode_
|
<< "When converting from " << fromcode_
|
||||||
<< " to " << tocode_ << ".\n";
|
<< " to " << tocode_ << ".\n";
|
||||||
lyxerr << "Input: " << std::hex;
|
lyxerr << "Input:" << std::hex;
|
||||||
for (size_t i = 0; i < buflen; ++i) {
|
for (size_t i = 0; i < buflen; ++i) {
|
||||||
boost::uint32_t const b = buf[i];
|
// char may be signed, avoid output of
|
||||||
lyxerr << "0x" << b << " ";
|
// something like 0xffffffc2
|
||||||
|
boost::uint32_t const b =
|
||||||
|
*reinterpret_cast<unsigned char const *>(buf + i);
|
||||||
|
lyxerr << " 0x" << b;
|
||||||
}
|
}
|
||||||
lyxerr << endl;
|
lyxerr << endl;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user