����ַ���ת����
| 579 | |
| 580 | // ����ַ���ת���� |
| 581 | charset_conv* charset_conv::create(const char* fromCharset, const char* toCharset) |
| 582 | { |
| 583 | if (fromCharset == NULL || toCharset == NULL) { |
| 584 | return NULL; |
| 585 | } |
| 586 | if (strcasecmp(fromCharset, toCharset) == 0) { |
| 587 | return NULL; |
| 588 | } |
| 589 | |
| 590 | charset_conv* conv = NEW charset_conv(); |
| 591 | if (!conv->update_begin(fromCharset, toCharset)) { |
| 592 | delete conv; |
| 593 | return NULL; |
| 594 | } |
| 595 | return conv; |
| 596 | } |
| 597 | |
| 598 | string strconv(const char* in, size_t len, |
| 599 | const char* from_charset, const char* to_charset) |
nothing calls this directly
no test coverage detected