Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
b58efae107 | |||
cc0dd9978f | |||
4834f63a67 | |||
1be78a2c5e | |||
f5581557bc | |||
8cde88848b | |||
0799513ea2 | |||
effeee105c |
4
.github/workflows/pypi-deploy.yml
vendored
4
.github/workflows/pypi-deploy.yml
vendored
@@ -1,9 +1,9 @@
|
||||
|
||||
name: Build Python Wheels
|
||||
name: CI Build Wheel
|
||||
|
||||
on:
|
||||
push:
|
||||
#branches: [master]
|
||||
# branches: [master]
|
||||
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
||||
|
||||
jobs:
|
||||
|
@@ -1,10 +1,8 @@
|
||||
|
||||
[](https://lgtm.com/projects/g/RecordEvolution/IMCtermite/alerts/)
|
||||
[](https://lgtm.com/projects/g/RecordEvolution/IMCtermite/context:cpp)
|
||||
[](https://lgtm.com/projects/g/RecordEvolution/IMCtermite/context:python)
|
||||
[](https://img.shields.io/github/license/RecordEvolution/IMCtermite)
|
||||
[](https://img.shields.io/github/stars/RecordEvolution/IMCtermite)
|
||||

|
||||

|
||||
[](https://pypi.org/project/IMCtermite/)
|
||||
|
||||
# IMCtermite
|
||||
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#include <time.h>
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#include <iconv.h>
|
||||
#elif defined(__WIN32__) || defined(_WIN32)
|
||||
#define timegm _mkgmtime
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------//
|
||||
@@ -494,28 +496,35 @@ 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_;
|
||||
|
||||
// set up converter
|
||||
std::string utf = std::string("UTF-8");
|
||||
iconverter conv(cpn,utf);
|
||||
|
||||
conv.convert(name_);
|
||||
conv.convert(comment_);
|
||||
conv.convert(origin_);
|
||||
conv.convert(origin_comment_);
|
||||
conv.convert(text_);
|
||||
conv.convert(language_code_);
|
||||
conv.convert(yname_);
|
||||
conv.convert(yunit_);
|
||||
conv.convert(xname_);
|
||||
conv.convert(xunit_);
|
||||
conv.convert(group_name_);
|
||||
conv.convert(group_comment_);
|
||||
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");
|
||||
iconverter conv(cpn,utf);
|
||||
|
||||
conv.convert(name_);
|
||||
conv.convert(comment_);
|
||||
conv.convert(origin_);
|
||||
conv.convert(origin_comment_);
|
||||
conv.convert(text_);
|
||||
conv.convert(language_code_);
|
||||
conv.convert(yname_);
|
||||
conv.convert(yunit_);
|
||||
conv.convert(xname_);
|
||||
conv.convert(xunit_);
|
||||
conv.convert(group_name_);
|
||||
conv.convert(group_comment_);
|
||||
}
|
||||
|
||||
// get info string
|
||||
|
@@ -1 +1 @@
|
||||
2.0.15
|
||||
2.0.17
|
||||
|
Reference in New Issue
Block a user