by default use codepage1252 for metadata including non-ascii characters while missing codepage info
This commit is contained in:
parent
effeee105c
commit
0799513ea2
@ -496,10 +496,18 @@ namespace imc
|
||||
// convert any description, units etc. to UTF-8 (by default)
|
||||
void convert_encoding()
|
||||
{
|
||||
// actual input codepage
|
||||
std::string cpn;
|
||||
|
||||
if ( !codepage_.empty() )
|
||||
{
|
||||
// construct iconv-compatible name for respective codepage
|
||||
std::string cpn = std::string("CP") + codepage_;
|
||||
cpn = std::string("CP") + codepage_;
|
||||
}
|
||||
else {
|
||||
// assume codepage 1252 by default
|
||||
cpn = std::string("CP1252");
|
||||
}
|
||||
|
||||
// set up converter
|
||||
std::string utf = std::string("UTF-8");
|
||||
@ -518,7 +526,6 @@ namespace imc
|
||||
conv.convert(group_name_);
|
||||
conv.convert(group_comment_);
|
||||
}
|
||||
}
|
||||
|
||||
// get info string
|
||||
std::string get_info(int width = 20)
|
||||
|
Loading…
x
Reference in New Issue
Block a user