login about faq

This function doesn't work because CkZip use "const char" params. If I want to unzip a file with sFileName "c:usersFrançoiseNuñezDesktopMyZip.zip", CkZip doesn't allow this. And If I convert from wstring to string, international characters are missing. Any ideas?

void UnZip(const std::wstring& sFileName, const std::wstring& sPath) {

    CkZip zip;
    zip.UnlockComponent("my serial");        
    zip.OpenZip(sFileName.c_str());
    zip.Extract(sPath.c_str());
    zip.CloseZip();

}

asked Apr 29 '13 at 05:51

Jesus's gravatar image

Jesus
1111


There are two solutions:

1) Use the Chilkat Unicode API which uses wchar_t: http://www.chilkatsoft.com/refdoc/wcpp.asp

2) Pass utf-8 strings to the Chilkat multibyte API: Utf8 C++ property allows for utf-8 or ANSI “const char *” Also, CkString can be helpful. See http://www.example-code.com/vcpp/string.asp

link

answered Apr 29 '13 at 08:26

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×20
×8
×6
×1

Asked: Apr 29 '13 at 05:51

Seen: 1,091 times

Last updated: Apr 29 '13 at 08:26

powered by OSQA