| 596 | } |
| 597 | |
| 598 | string strconv(const char* in, size_t len, |
| 599 | const char* from_charset, const char* to_charset) |
| 600 | { |
| 601 | charset_conv conv; |
| 602 | string res; |
| 603 | if (conv.convert(from_charset, to_charset, in, len, &res)) { |
| 604 | return res; |
| 605 | } else { |
| 606 | logger_error("convert error, from=%s, to=%s", |
| 607 | from_charset, to_charset); |
| 608 | res.clear(); |
| 609 | return res; |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | } // namespace acl |
no test coverage detected
searching dependent graphs…